[luatex] \font primitive does not read otf file
Paul Isambert
zappathustra at free.fr
Mon Dec 3 11:56:12 CET 2012
Selon Ulrike Fischer <luatex at nililand.de>:
> Am Sun, 2 Dec 2012 12:11:40 +0100 schrieb Petr Olsak:
>
> >>> I am starting with LuaTeX and I have problem to find the relevant
> >>> documentation about \font primitive. There is only one document
> >>>
> >>> http://www.luatex.org/talks/print-plain-tug-2009.pdf
> >>>
> >>> page 7. It seems that the \font primitive works like in XeTeX.
>
> >> No, \font works more or less like in pdftex. But there is a
> >> "callback" where you can insert lua-code (a "font-loader") to expand
> >> its capabilities.
>
> >> One existing font loader is luaotfload so try this:
> >>
> >> \input luaotfload.sty
> >> \font\aa="[lmroman10-regular]"
> >> \aa text
> >> \bye
>
> >
> > I am developing plainTeX macros. The solution which loads some sty file
> > and starts loading 18 another .sty files (!!) to solve one SIMPLE problem
> > is not compatible with plainTeX philosophy.
>
> It is not a simple problem. Modern fonts can be quite complicated,
> with all the scripts, font features and open type tables involved.
> Also the sty don't handle only the fonts, it also create caches -
> luatex is already rather slow compared to xetex, without sensible
> caches large fonts would not be usable. Beside this I do find it
> quite absurd to dismiss code on the ground that it had been split in
> more or less pieces or uses external libraries.
>
> But if you prefer to create your own font loader, you can find here
> simple font loader to start here:
>
> http://luatex.bluwiki.com/go/Use_a_TrueType_font
A tidier version of this code can be found on the LuaTeX wiki:
http://wiki.luatex.org/index.php/Use_a_TrueType_font
Of course, that code is quite minimal, and doesn't even begin to consider trying
to handle OTF features (barring a little bit of kerning); actually, it doesn't
do much more than using a font's glyphs.
Best,
Paul
More information about the luatex
mailing list