[luatex] luaotfload: Random font changes with mode=base

Khaled Hosny khaledhosny at eglug.org
Thu Mar 13 02:08:48 CET 2014


On Wed, Mar 12, 2014 at 08:31:30PM +0100, Philipp Gesang wrote:
> Hi Ulrike!
> 
> ···<Datum: Wednesday, 12. March 2014>···<Von: Ulrike Fischer>···
> 
> > If I compile this document more than once (I think I have now
> > compiled it and similar documents around 200 times ;-))
> > 
> > \documentclass{scrreprt}
> > \usepackage{luaotfload}
> > \font\sup={name:Linux Libertine O:+onum;+sups;mode=base}
> > \begin{document}
> > abc\sup123467
> > \end{document}
> > 
> > then in around 50% of the pdf the numbers are (as wanted)
> > superscripts, and in the other pdf the numbers are normal old style
> > numbers. 
> 
> Confirmed for version 0.78.2 (4746) and the most recent
> fontloader as part of Context, version 2014.03.07 11:42.
> 
> Here’s the code for Plain and Context:
> 
>     https://bitbucket.org/phg/lua-la-tex-tests/src/5460c0b7718a49f4831adacd84b9791e10e305f1/pln-superscript-textfigures-1.tex
>     https://bitbucket.org/phg/lua-la-tex-tests/src/47f2f2e7dcd605a8744357aa9a7996ec9525e75c/cnt-superscript-textfigures-1.tex
> 
> > I can accept that you can't combine onum + sups, but why is the
> > result so random?
> 
> Lua makes no guarantees about the order of indexes on the hash
> part of tables. The behavior you observed is consistent with the
> feature strings being used as indices (which indeed they are) and
> then iterated over with next().
> 
> >                   (with mode=node +sups wins always).
> 
> No idea why. Xetex appears to prefer onum …

Which feature wins depends on several factors (some features should be
processed before others per the OpenType standard, the order of the
lookups in the font, and how the font developer designed its features),
the order of the features in the font definition is irrelevant except
when a feature is specified multiple times (e.g. +onum;-onum), then the
last one takes precedence.

Regards,
Khaled
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20140313/9086b803/attachment.bin>


More information about the luatex mailing list