[luatex] Unicode composite characters and TrueType fonts

Daniel Flipo daniel.flipo at free.fr
Fri May 26 21:03:15 CEST 2017


Le 25/05/2017 à 19:00, Ulrike Fischer a écrit :

> There has been a rather long discussion about this on the context
> list in februar:
> 
> http://www.mail-archive.com/ntg-context@ntg.nl/msg84424.html
> 
> In short: the harfbuzz library in xetex tries to use the composed
> glyph if it exists. 
> 
> You can mimick this feature, by adding "ligatures" which combine the
> accent and the char. This here works for me on texlive 2017:

Your suggestion works fine for me also with fonts which do have the
needed diacritics (acute accent ^^^^0301 in my example), but fails
otherwise: this happens for instance with the Georgia font.

My concern is about French and fonts which have all the precomposed
characters used in French (àâéèêëîïôûùç lower and uppercase) built-in.
Fonts not satisfying this criteria (relying on composite characters
only) would probably not provide correct hyphenation anyway.

So another approach could be to build a table of possible composite
characters for a given language and a Lua function which would replace
each composite char found in the node list and belonging to the table
(f.i. e^^^^0301) by the corresponding precomposed char (é) or warn if
the replacement doesn't exist in the current output font.

Does something like this exist already?

Thanks,
-- 
Daniel Flipo


More information about the luatex mailing list