[XeTeX] Ligatures and searching in PDFs

Andy Lin kiryen at gmail.com
Wed Jun 2 00:16:55 CEST 2010

> One ting I'm wondering about: not all of the fonts I use always have
> all those ligatures. From what I understand from you, can't check
> right now, glyphs will be replaced usgin the mapping regardless of
> glyph availability, which would lead to missing glyphs in the docuemnt
> if not available.
This is correct. I actually ran into a different problem with Cronos
Pro: the wrong glyph was at the code point (this is the case even if
you use the font's own OT table!)

> Would it therefore make more sense to put these mappings in a separate
> file and load that mapping as well when required? Can multiple
> mappings be loaded?
Not at the same time for the same font, that I know of.

The problem is that teckit mappings were designed to handle legacy
(non-Unicode) fonts, which do not have OT tables to produce the proper
glyph combinations when given complex input (such as Arabic or Indic
script). Thus, when a font has its own OT tables, things don't
necessarily work as one might expect. In the case that a font has OT
features, these are only applied AFTER the teckit mapping is applied,
so there's no way for the teckit engine to anticipate which ligatures
a font may have. Nor do I know of a way for XeTeX to discern which
ligatures a font may have (aside from doing a "if glyph exists at
U+FB01" check for each possible ligature glyph, which wouldn't catch
Junicode's rare/historical ligatures (although this might be useful
for fonts with the regular repertoire of ligatures)).

> Can't try this out for a while and guess I'm not the only one who
> thinks of this, so just posting the question to list.
This is definitely something that's been on my mind for a while as
well, I would be very interested in seeing other people's thoughts on
the matter.

Side note: Calibri has numerous default ligatures aside from the
f/ff-type. If anyone is interested in a teckit mapping for that font,
I'll upload it when I find it. I'll make one for Junicode if someone
can provide me with a list of the ligatures it has.

-Andy Lin

More information about the XeTeX mailing list