[luatex] Unicode composite characters and TrueType fonts

Daniel Flipo daniel.flipo at free.fr
Wed May 24 20:08:49 CEST 2017


Most TrueType fonts fail to output Unicode composite characters properly
when using LuaTeX while they do a good job with XeTeX.

Let's take <e-acute> as an example. In principle, <e-acute> can be coded
as U+00E9 or as U+0065 U+0301 (e+acute). The following example compiled
with LuaTeX shows differences which depend on the font:

--8<---------------cut here---------------start------------->8---
\input luaotfload.sty


% été is coded as U+00E9 U+0074 U+0065 U+0301
% (visible using emacs for instance).
\verdana e^^^^0301, été    % misplaces accent

\georgia e^^^^0301, été    % swallows accent

\arial e^^^^0301, été      % places accent (a lot) too high

\roboto e^^^^0301, été     % correct

--8<---------------cut here---------------start------------->8---

The corresponding example for XeTeX would be:

--8<---------------cut here---------------start------------->8---
\input font-change-xetex

\myzfont {Verdana}{10}{}  e^^^^0301, été   % correct

\myzfont {Georgia}{10}{}  e^^^^0301, été   % correct

\myzfont {Arial}{10}{}    e^^^^0301, été   % correct

\myzfont {Roboto}{10}{}   e^^^^0301, été   % correct
--8<---------------cut here---------------start------------->8---

Should the TTF fonts be blamed or is it a LuaTeX bug? None of the
OpenType fonts I tried showed differences between the two encodings for
<e-acute> both with LuaTeX and XeTeX.

Thanks in advance for your comments and/or workarounds!
Daniel Flipo

More information about the luatex mailing list