[luatex] fontloader in iniTeX
Hans Hagen
pragma at wxs.nl
Tue Aug 9 14:08:39 CEST 2016
On 8/9/2016 12:28 PM, Pali Rohár wrote:
> On Tuesday 09 August 2016 11:02:37 Hans Hagen wrote:
>> On 8/9/2016 10:00 AM, Pali Rohár wrote:
>>> On Tuesday 09 August 2016 09:44:44 Hans Hagen wrote:
>>>> On 8/9/2016 9:41 AM, Pali Rohár wrote:
>>>>> On Sunday 31 July 2016 12:16:59 Pali Rohár wrote:
>>>>>> Hi!
>>>>>>
>>>>>> I tried to preload csr10 font with fontloader into TeX format during
>>>>>> iniTeX run:
>>>>>>
>>>>>> \font\csr=file:csr10.tfm:reencode=auto;mode=node;liga=yes;kern=yes
>>>>>>
>>>>>> On output terminal I see these lines:
>>>>>>
>>>>>> \font\csr=csr10
>>>>>> \font\^^@=csr10
>>>>>>
>>>>>> But when I tried to use that \csr font in document then all ligatures
>>>>>> and kerning are ignored (or not used). Any idea where is problem?
>>>>>>
>>>>>> Note that font is correctly encoded and everything looks good, just
>>>>>> output looks to be same as if font was loaded without liga=yes;kern=yes
>>>>>> parameters...
>>>>>>
>>>>>
>>>>> Hans, any idea why kerns are ignored when font is dumped into format
>>>>> during iniTeX run?
>>>>
>>>> don't dump fonts, just load then at runtime (it's fast enough)
>>>
>>> I just want to have \ten* definitions so macros \rm \it \tt ... works
>>> automatically without need to re-define them in every one document.
>>>
>>> I do not like idea to define all those macros everytime in everyone
>>> document... As I think that for these situation can be TeX format used.
>>
>> then define the \tt in such a way that the first thing it does is to load a
>> font
>
> For \tt some "hack" as you suggest is possible, but there are also
> problems with \fam fonts used in math mode.
it all depends on what you want to do: if you want a traditional tfm
font, you can just define it, and it gets stored in the format; in that
case you use tfm/enc/map/pfb/pk combinations and operate in a 8 bit
universum
if you want a font with all kind of extras done in lua, you can try to
store and recover the lua related part but in that case it's more
realistic to just load at runtime because you need to initialize lua
anyway (no mem dump)
as you don't want to use active (utf) characters (if i remember right)
to map onto 8 bit font slots but utf directly you need wide fonts and
the tfm alternative for that is ofm fonts (of which there are only a
handful) so that's no option
so, if you want open type support, virtual wide fonts, all kind of
clever things ... loading runtime is the way to go (or alternatively you
can wrap up some complex font management system that somehow reassembles
a lua enhanced font after loading a format from info in the format which
effectively boils down to just reloading the font runtime but more complex)
> And problem is with \rm and default loaded font.
no problem .. all a matter of proper definitions
>>> Anyway, it is limitation of fontloader or bug?
>>
>> a feature
>
> In this way, it is not possible to dump any font into format :-( which
> also means that there is also no default font when starting tex.
i'm pretty sure that e.g. in context users get a default font even when
none is stored in the format (and i'm also sure that users want
different defaults fonts)
compare it to buying a new car: you can put a kettle of water + coal in
the trunk but it won't move like your ancient stream powered one ... the
same is true for luatex, feed it the right ingredients in the right way
and it will do the job you expect it to do
(running in circles around the car won't make it move ... you need to
make a decision: stay in the 8 bit world or move on to unicode and
accept some changes ... so, staying with pdftex is a good option)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list