[luatex] ligatures with luaotfload

Javier Múgica de Rivera javieraritz.ribadeo at gmail.com
Sun Oct 9 12:58:37 CEST 2011


> you have to explicitly set kern and ligatures: [...] +liga;+kern

> if you don't select a script no feature will be enabled by default

Thank you two, both of

\def\otffont#1=#2 at{\font#1={#2: +kern;+liga} at}
\def\otffont#1=#2 at{\font#1={#2: script=latn} at}

work.

Now that I know the answer I have looked again into the luaoftload
manual and the OpenType Feature File Specification, and see that all
the nedeed pieces are present, but they appear scatered here and
there. You don't need to know anything about .tfm fonts in order to
use them. I would expect the same for otf fonts as long as you don't
ask for complicate operations. That is, I would expect

\input luaotfload.sty
\font\tenrm=LMRoman10-Regular

to be the same as

\font\tenrm=ec-lmr10


I _had_ read:

"script
OpenType script string, default value is dflt. Some fonts don’t assign
features to
the dflt script, in which case the script need to be set explicitly."

but since Latin Modern fonts are designed just for the Latin script I
could not imagine that keeping the default would miss features.
And it is true that at the section of "Troubleshooting" there appears
the example

\font\myfont = MyFont.otf:script=latn;+liga;

but here the key words latn and liga just happen to appear. That is,
if you want kerning you still have to find the appropriate word for
that somewhere else, as well as if you want some other script. And
after a good deal of browsing through the Internet to find the right
answer (the name for the kerning and ligature features) I had simply
forgotten about this last example, something likely to happen if you
need to put ten different pieces of information together in order to
make something work.

To summarize, in my opinion

    a) The package should try hard to make its default behavior what a
user would want when loading an OpenType font.

and

    b) It should provide a list of script names when it describes the
keyword script, and a list of feature names when it mentions that font
features are enabled/disabled "in the form of +feat/-feat" (there is
not a single example).

   The solution for point a) may just be to always activate kerning,
ligatures and final or other alternatives shapes for glyphs (is this
what is called contextual ligatures?)


Finally, Khaled, thank you very much for the package! I had asked some
two or three years ago how I could use an OpenType font in Luatex and
the answer was essentially "program it yourself"

Regards
Javier A. Múgica



More information about the luatex mailing list