Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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™?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\fontspec[
    Renderer=Graphite,
    RawFeature={
      Special=Hide tone contour staves
    }
  ]{Charis SIL}
foo
\end{document}

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
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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