[XeTeX] Latin Modern, from TFM to Unicode

Khaled Hosny khaledhosny at eglug.org
Wed Jun 12 21:08:33 CEST 2013


On Wed, Jun 12, 2013 at 01:32:10PM -0600, Doug McKenna wrote:
> Or whether 
> they are part of some internal ligature-like structure that only the 
> OpenType font has information about (which might mean that the glyph IDs 
> can change internally from one release to the next of the OT font).

Right. More specifically, they are accessed via the MATH table of the
font.

> Or if they don't have quite the same metrics, the differences 
> are not going to change over time with new versions of the OT font.

They don't have the same metrics, especially the math extention fonts
(like lmex10) as TeX have some peculiar limitations of there glyph
metrics, that do not exist in OpenType.

If all you want is direct mapping to what is present in TFM files, then
you are better using Latin Modern Type1 fonts and converting them to
OpenType if necessary (should be trivial, using FontForge or other font
editor/conversion tool).

If you really want to use Latin Modern Math, then the cleanest way is to
read and parse OpenType MATH table, but that is a bit of work (or you
can extract that code from XeTeX source, it is fairly isolated and
generic code).

> Consider the radical sign.  In the TFM file, there is information that 
> TeX uses to determine which final glyph(s) to use, based on the height of 
> the box of whatever's underneath the radical.  So TeX chooses the glyph 
> in slot "70 for small height, or the glyph in slot "71 for medium height, 
> or the one in slot "72 for large height, or slot "73 for even larger 
> height.  If none of those fixed-height glyphs are high enough, presumably 
> TeX goes into a tall symbol construction algorithm based on data within 
> the TFM file, using glyphs representing pieces of radical signs, kept in 
> slots "74, "75, and "76.

Similar data (and more) is contained in the MATH table.

Regards,
Khaled


More information about the XeTeX mailing list