I want to use a Graphite font as the main font in a XeLaTeX document, but fontspec doesn't support Graphite fonts yet. Currently I'm using XeTeX's native way to change fonts, but that's cumbersome, as I have to define one font for each size-family-series combination I want to use. Is there some hack to make fontspec work with Graphite fonts or perhaps some other way to change the whole default family so that stuff like \Large and \emph just works™?


You are correct that fontspec doesn't have proper support for Graphite fonts yet. However, I did once add the option to select the Graphite font renderer. Here's an example:

      Special=Hide tone contour staves
  ]{Charis SIL}

I've hardly worked at all with any Graphite fonts, however, and I don't know if this is sufficient (it's certainly not optimal in terms of user interface).

Update: here's an actual example that shows something useful:

\fontspec[Renderer=Graphite,RawFeature={1024=0}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=1}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={Uppercase Eng alternates=Large eng on baseline}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=2}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=3}]{Charis SIL} Ŋ

Lines 2 and 3 are equivalent. To get a listing of what font features are available, you can use the ‘aat-info.tex’ file and use the following for the first two code lines:

\def\myfontname{Charis SIL/GR}
\font\testfont="\myfontname" at 10pt
  • All I need is the rendering to work, I don't really to mess with the features, so that should be enough for my needs. However, the version on texlive 2009 doesn't have that yet, and debian probably won't get tl2010 soon, as it's currently frozen. I'll try a newer version of fontspec with tl2009 and hopefully that'll work. – Rodrigo Tjäder Oct 20 '10 at 15:31
  • I didnt realise i added this feature so recently. I recommend upgrading to tl2010 in that case. – Will Robertson Oct 20 '10 at 15:35
  • It seems to me that there is still no support for Graphite in tl2012's fontspec. Or has it been dropped again? – mach Nov 13 '12 at 9:30
  • Ran out of time to do it properly; nothing documented but the examples on this page should still work. – Will Robertson Nov 13 '12 at 12:31
  • On the latest version of e.g. Gentium Plus, with alpha font IDs, XeTeX doesn't seem to be able to use the alpha IDs, requiring huge numeric IDs instead. See Graphite features on Gentium Plus for more details. – Alan Munn Jan 5 '13 at 22:39

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.