google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.19k stars 2.61k forks source link

Issue with Quicksand[wght].ttf #2314

Open saward opened 4 years ago

saward commented 4 years ago

Hi,

I've been using these fonts as part of a base docker image creating latex PDF's. It's been working fine with the last update about 9 months ago, but I recently updated the base docker image, which pulled the very latest Google fonts. I'm now having an issue building the latex file. The relevant error is xdvipdfmx:fatal: Invalid TTC index (not TTC font): /usr/local/share/fonts/Quicksand[wght].ttf. That error in some context:

/usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty)))
(/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty)
(./main.aux)
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
ABD: EveryShipout initializing macros
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty)

LaTeX Font Warning: Font shape `TU/Quicksand(0)/m/sl' undefined
(Font)              using `TU/Quicksand(0)/m/n' instead on input line 52.

Package Fancyhdr Warning: \headheight is too small (12.0pt): 
 Make it at least 14.49998pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

[1] (./main.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

xdvipdfmx:fatal: Invalid TTC index (not TTC font): /usr/local/share/fonts/Quicksand[wght].ttf

Output file removed.
 )
Error 256 (driver return code) generating output;
file main.pdf may not be valid.
SyncTeX written on main.synctex.gz.
Transcript written on main.log.
=== TeX engine is 'XeTeX'
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'main.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.

Removing this file from my system enables me to build the PDF without issue.

I don't understand the details of fonts well enough to understand who or what is at fault. I thought I'd post this here in case someone can point me in the right direction -- is this an issue with this ttf file, or something else?

Thanks!

felipesanches commented 4 years ago

I am not sure what's going on, but I have two guesses:

1) does it have something to do with the "[wght]" on the filename? In other words, does it work if you rename the file to not use that bracket notation that we use to indicate the variable font axis?

2) was quicksand recently updated from a set of static fonts into a variable font? If so, maybe LaTeX may be having trouble parsing a variable font? I am not sure what's the level of support for variable fonts in LaTeX nowadays.

saward commented 4 years ago

Renaming and running fc-cache -f results in the same error:

xdvipdfmx:fatal: Invalid TTC index (not TTC font): /usr/local/share/fonts/Quicksand.ttf

I did look through the commit history for this repo, and saw that this font was added since my last build. I strongly suspect that the last time I fetched this repo was before these commits:

Apart from that, I don't understand enough about your second guess to remark intelligently.

felipesanches commented 4 years ago

yeah... At #2050 I see: "In 2019, Mirko Velimirovic converted the family into a variable font."

I think LaTeX does not deal well with variable fonts yet.

saward commented 4 years ago

I'm now also seeing this for another font I have been using:

xdvipdfmx:fatal: Invalid TTC index (not TTC font): /usr/local/share/fonts/Inconsolata[wdth,wght].ttf

dsevilla commented 2 years ago

It happened to me the same with EBGaramond[wght].ttf... :( Now I can't use it in my XeLaTeX documents :(