Debian Codegraph @

README.xelualatex

raw
1 Short note about using XeLaTeX and LuaLatex with EB Garamond via fontspec.
2
3 EB Garamond fonts are loaded through fontspec with
4
5 \setmainfont{EB Garamond}
6
7 This will load the appropriate fonts for the actual sizes, currently EBGaramond08* for sizes up to 10pt and EBGaramond12* from 10.1pt onwards.
8
9 If you want to stay with one design size, you have to load its regular font and switch off optical sizes:
10
11 \setmainfont[OpticalSize=0]{EB Garamond 12 Regular}
12
13 If you wish to use a specific font file, e.g. EB Garamond Italic:
14
15 \setmainfont{EB Garamond 12 Italic}
16
17 N.B. It is preferable to use the +c2sc and +scmp features for Small Caps, rather than the SC or ALLSC font files.
18
19 \newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
20
21 The specimen’s preamble may be a good guide too.