Package: fontconfig Version: 2.11.94-0ubuntu1.1 Severity: normal Dear Maintainer,
I have seen reports of problems on XeTeX on Ubuntu not handling WOFF files, both told to me in person and also on the web [1]. The expectation was if a font name (not a pathname to a font) is given to XeTeX, fontconfig will return a .ttf or .otf font that XeTeX can use. If a WOFF font is returned, XeTeX aborts with an error message. Here are the steps I took to see this. $ sudo apt-get install texlive texlive-binaries texlive-xetex $ sudo apt-get install fonts-sil-andikanewbasic Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: fonts-sil-andikanewbasic 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1,033 kB of archives. After this operation, 2,136 kB of additional disk space will be used. Get:1 http://ca.archive.ubuntu.com/ubuntu xenial/universe amd64 fonts-sil-andikanewbasic all 5.500-1 [1,033 kB] Fetched 1,033 kB in 1s (723 kB/s) Selecting previously unselected package fonts-sil-andikanewbasic. (Reading database ... 241863 files and directories currently installed.) Preparing to unpack .../fonts-sil-andikanewbasic_5.500-1_all.deb ... Unpacking fonts-sil-andikanewbasic (5.500-1) ... Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ... Setting up fonts-sil-andikanewbasic (5.500-1) ... $ cat fontconfig.tex \font\text="Andika New Basic/OT" at 12pt \nopagenumbers \obeylines \text Now is the time for all good men to come to the aid of their country. \bye $ xetex fontconfig.tex This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) (preloaded format=xetex) restricted \write18 enabled. entering extended mode (./fontconfig.tex [1] xdvipdfmx:fatal: Cannot proceed without the font: /usr/share/fonts/woff/andikanewbasic/AndikaNewBasic-R.woff Output file removed. ) Error 256 (driver return code) generating output; file fontconfig.pdf may not be valid. Transcript written on fontconfig.log. $ cat fontconfig.log This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) (preloaded format=xetex 2017.5.5) 5 MAY 2017 21:52 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **fontconfig.tex (./fontconfig.tex [1] ) Error 256 (driver return code) generating output; file fontconfig.pdf may not be valid. $ sudo mv /usr/share/fonts/woff/andikanewbasic/AndikaNewBasic-R.woff /usr/share/fonts/woff/andikanewbasic/AndikaNewBasic-R.woff_ $ fc-cache $ xetex fontconfig.tex This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) (preloaded format=xetex) restricted \write18 enabled. entering extended mode (./fontconfig.tex [1] ) Output written on fontconfig.pdf (1 page). Transcript written on fontconfig.log. $ cat fontconfig.log This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) (preloaded format=xetex 2017.5.5) 5 MAY 2017 21:54 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **fontconfig.tex (./fontconfig.tex [1] ) Output written on fontconfig.pdf (1 page). The above steps where run on Ubuntu Xenial 16.04.2 amd64 texlive-binaries 2015.20160222.37495-1 texlive-xetex 2015.20160320-1 -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-77-generic (SMP w/1 CPU core) Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.utf8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages fontconfig depends on: ii dpkg 1.18.4ubuntu1.2 ii fontconfig-config 2.11.94-0ubuntu1.1 ii libc6 2.23-0ubuntu7 ii libfontconfig1 2.11.94-0ubuntu1.1 ii libfreetype6 2.6.1-0.1ubuntu2.2 fontconfig recommends no packages. fontconfig suggests no packages. -- debconf-show failed A fix is to not install WOFF files below /usr/share/fonts/, as fontconfig looks at this directory. I tested this by renaming the WOFF file, and then xetex ran correctly. However, the Debian Pkg-fonts-devel list feels that applications such as XeTeX should filter out fontconfig returning a WOFF file[2] or maybe fontconfig should not return WOFF files[3], even if they are installed under /usr/share/fonts/. The author of both XeTeX and the WOFF spec, Jonathan Kew, feels that the installed WOFF files should not be found by fontconfig[4]. I wonder if there has been some confusion in these discussions between the use of fonts in a desktop GUI environment, and for use on a server. It seems to me that the server environment is really two different cases, one where a server might be used XeTeX or CUPS to provide a service (as mentioned in [5]) or an HTTP server serving a WOFF font to a client. IIUC, WOFF files were designed only to be used by a HTTP server. Maybe a good question to ask are there any HTTP servers on Debian (and derivatives) that used fontconfig to locate WOFF files? FYI, I filed a bug about this issue with XeTeX [6]. Thanks, Bobby [1] https://tex.stackexchange.com/questions/330195/how-to-set-up-the-font-scheherazade-for-use-with-xelatex [2] https://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2017-April/019338.html [3] https://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2017-May/019459.html [4] https://www.tug.org/pipermail/xetex/2017-April/027069.html [5] https://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2017-April/019361.html [6] https://sourceforge.net/p/xetex/bugs/139/ -- Bobby de Vos /bobby_de...@sil.org/