1

I read some post about xelatex and optical size fonts, but generally the codex is as follows:

\usepackage{fontspec}
\defaultfontfeatures{Contextuals=NoAlternate}
\setmainfont[Ligatures=TeX,
Numbers=OldStyle,
Scale=1.1,
SizeFeatures={%
 {Size={-8.4},Font=* Caption},
 {Size={8.41-13.0},Font=*},
 {Size={13.01-19.9},Font=* Subhead},
 {Size={19.91-},Font=* Display}
 }]{Garamond Premier Pro}

However, I've got a font (ATF Garamond), whose weights belong to different families:

  • Garamond ATF Micro (Regular, Rgular Italic, Bold, ... )

  • Garamond ATF Text (Regular, Rgular Italic, Bold, ... )

  • Garamond ATF Subhead (Regular, Rgular Italic, Bold, ... )

so I cannot use as in the last line of my example

 }]{Garamond Premier Pro}

I tried

\setmainfont[%
  UprightFont=*,
  ItalicFont=* Italic,
  BoldFont=* Bold,
  BoldItalicFont=* Bold Italic,
  Ligatures=TeX,
  Contextuals=NoAlternate,
  Numbers=OldStyle,
  SizeFeatures={%
        {Size={-8.4},Font=* Micro},
        {Size={8.41-13.0},Font=* Text},
       {Size={13.01-19.9},Font=* Subhead}
        },
  Extension=.otf,
  Path= /usr/local/share/fonts/opentype/ATFGaramond/
]{Garamond ATF *}

but it produces an error:

Invalid filename `[/usr/local/share/fonts/opentype/ATFGaramond/Garamond ATF *.otf]/OT', contains '['

! Package fontspec Error: The font "Garamond ATF *" cannot be found.

For immediate help type H <return>.
 ...                                              

l.92 

How is possible to suggest to XeLatex to use correctly the whole families?

thanx

  • This is a guess, since that’s one of the (rare) fonts on which I’ve resisted splurging, but have you tried \setmainfont{Garamond ATF Text}[Contextuals=NoAlternate,Numbers=OldStyle,SizeFeatures={{Size={-8.4},Font=Garamond ATF Micro},{Size={8.41-13.0}},{Size={13.01-19.9},Font=Garamond ATF Subhead}}]? – Thérèse Oct 22 '18 at 18:33
  • Already aptended and so it complies.But how can I verify it really use all optical fonts? PS Do you prefer this Garamond to Premiere or to EB Garamond? – user41063 Oct 22 '18 at 19:04
  • Look at the fonts listed in the “Properties” menu of your PDF viewer, or use the command line tool pdffonts. Do all the fonts appear (assuming that you have large and small text in your document), or only Garamond ATF Text? And does the greyness of the page look even? I can’t comment fairly on your last question since I have only two of the three families and so can’t inspect them with equal closeness. – Thérèse Oct 22 '18 at 19:32
  • No, it uses only Text fonts, not the other ones, nor micro nor subhead – user41063 Oct 22 '18 at 20:00
  • Rats! Guess I’ll have to buy the font family for purposes of experimentation (sounds like a good excuse…). – Thérèse Oct 22 '18 at 20:02
1

I had to change with FontForge all font family name from GaramondATF Text, GaramondATF Subhead etc to GaramondATF to create an unique family. Now I can use correctly XeLaTeX

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.