[XeTeX] \font usage
jonathan_kew at sil.org
Sat May 13 23:08:21 CEST 2006
On 13 May 2006, at 5:45 pm, Wlodek Bzyl wrote:
> In plain.tex
> in order to prepare TeX for using `Minion Pro' Regular I use
> \font \X = "Minion Pro/Regular"
It should be sufficient to use the family name here:
\font\X = "Minion Pro"
To give a family + style, you use a hyphen (not slash) to separate
them, so that would be
\font\X = "Minion Pro-Regular"
The slash that you may have seen in some examples introduces
"modifier flags" that are not actually part of the font name, but
extra directive to XeTeX. In particular, /B asks XeTeX to look for a
bold style in the given family, and /I looks for an italic style (and
so /BI or /IB should find bold italic). These are supposed to
identify appropriate styles even if the names are not actually "Bold"
and "Italic" (they might be "Heavy" and "Oblique", for instance).
> To use Bold Italic I tried
> \font \Y = "Minion Pro/Bold Italic"
> But `\Y' switches to Bold.
Yes, it would (see above). Unrecognized flag characters after the
slash will be ignored.
\font\Y = "Minion Pro/BI"
should give you bold italic. Or you can say "Minion Pro-Bold
Italic" (I expect).
> What about extending the syntax of \font primitive, to
> use `Bold Italic'?
> I am using the latest Linux version of XeTeX.
> On my system there are two URW Gothic fonts:
> URW Gothic L:style=Demi
> URW Gothic L:style=Demi Oblique
> (fc-list | egrep Gothic)
> What is the correct way of preparing TeX to
> use Demi Oblique variant of URW Gothic L font?
> I would like if possible to use
> \font \Z = "URW Gothic L:style=Demi Oblique"
> but it doesn't work. Log file contains
> Unknown feature `style=Demi Oblique' in font `URW Gothic L
Right; the colon ends the font name (and style modifiers) and
introduces the list of AAT or OpenType features.
\font\Z = "URW Gothic L/BI"
\font\Z = "URW Gothic L-Demi Oblique"
However, I just tried this on my Linux machine and it doesn't work
reliably.... partly, at least, because the only version of URW Gothic
L present (on my system, at least) is in .pfb format, which XeTeX
doesn't handle well. I think if it were .otf, it would work properly.
I'll try to fix some of the issues with .pfb fonts.....
> And the final question: Where is the syntax of the \font
> primitive implemented?
You'll find the code in the file XeTeX_ext.c, if I remember right.
More information about the XeTeX