[XeTeX] protrusion for small caps

Jonathan Kew jfkthame at googlemail.com
Tue May 18 10:55:34 CEST 2010


On 18 May 2010, at 00:06, Robert wrote:

> On 18.05.10 00:37, Jonathan Kew wrote:
>>   \lpcode \x /w.SC = 500
> 
> Thanks, this works. However, the naming scheme doesn't seem to be generic but is font-specific, right?

Yes.

> It doesn't work for Minion Pro or Brioso Pro, for example. Is there a simple way to find out these glyph names?

Not really... you can use a tool such as FontForge to view the font, or ttx to dump its contents to a text file that will list all the glyphs, but it still may not be entirely obvious which glyphs are used in exactly which contexts, in cases with complex OpenType layout tables.

Another possibility would be to use xetex itself to produce a reference page listing all the glyphs with their names; you can iterate over all the glyphs, printing them with \XeTeXglyph <number> and getting their names with \XeTeXglyphname <font> <number>. Something like

  \font\f="MyFont" at 10pt \f
  \newcount\n
  \loop \noindent \number\n : \XeTeXglyph\n\ = \XeTeXglyphname\f\n \par
    \advance\n by 1 \ifnum\n<\XeTeXcountglyphs\f \repeat

though you'd want to format it a bit more tidily, I expect.

Note that it's possible for glyphs to be unnamed, in which case your only option is to specify them directly by glyph number (or by Unicode value, for each character's default glyph).

> 
> (The reason why I ask is that I'm currently adapting microtype to work with xetex,

Great!

> and I would of course prefer to make it as easy for the user as possible. So I would either like to automatically convert the "w" to the appropriate glyph name, or if that shouldn't be possible, at least give some simple instructions.)
> 
> Regards,
> -- 
> Robert
> 
> 
> 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex




More information about the XeTeX mailing list