[luatex] using fea files in plain TeX
Dohyun Kim
nomosnomos at gmail.com
Wed Aug 12 12:28:13 CEST 2009
2009/7/11 Dohyun Kim <nomosnomos at gmail.com>:
>
> 2.
> This tex file fails as well:
>
> \documentclass{article}
> \input luatex-fonts
> \DeclareFontEncoding{EU1}{}{}
> \DeclareErrorFont{EU1}{lmr}{m}{n}{10}
> \DeclareFontSubstitution{EU1}{lmr}{m}{n}
> \def\encodingdefault{EU1}
> \def\rmdefault{lmr}
> \def\sfdefault{lmss}
> \def\ttdefault{lmtt}
> \begin{document}
> \ttfamily\bfseries
> \end{document}
>
...
> I modified "define_font" callback.register function
> similarly to the following:
>
> callback.register('define_font',function(name,size,id)
> local fontdata = fonts.define.read(name,size,id) -- by hans
> if type(fontdata) == "table" then
> fontdata.name = name -- ttfamily/bfseries
> end
> return fontdata
> end)
>
Hi,
Sorry for reviving so old a thread.
While watching video of Jin-Hwan Cho's presentation in TUG 2009
( http://river-valley.tv/category/conferences/typesetting/tug2009/ ),
I realized that the approach I mentioned in previous email was bad.
So today I hacked latex's NFSS code, rather than hooking on lua callback.
\def\do at subst@correction{%
\global\expandafter\let\csname \curr at fontshape/\f at size
\expandafter\endcsname\font at name
\expandafter\aftergroup\csname \curr at fontshape/\f at size\endcsname
}
After applying this code, latex's font substitution scheme and
luatex-plain's lua code seem to be able to coexist quite well,
giving dvi output with proper font name.
Best Regards,
Dohyun Kim
More information about the luatex
mailing list