[luatex] luatex - font encoding for type 1 fonts
Hans Hagen
pragma at wxs.nl
Sun Jun 26 12:37:35 CEST 2016
On 6/25/2016 11:32 PM, Pali Rohár wrote:
> On Saturday 25 June 2016 14:47:43 Hans Hagen wrote:
>> Anyway, in the next context distribution upload (context also ships
>> with a plain variant) I have added a loader script. If you use
>> luaotfload you probably have to wait for an update at their end. The
>> luatex-plain format that ships with context can do this then:
>>
>> \font\foo=file:luatex-plain-tfm.lua:tfm=csr10;enc=csr;pfb=csr10 at
>> 12pt
>>
>> \foo áäčďěíĺľňóôŕřšťúýž fiets ff ffi
>>
>> \bye
>
> Great, that looks really good!
>
> What I still do not understand is why it is needed to specify enc=csr.
> Encoding vector is present in PFB file.
because the order in a pfb can be different and there can be more than
256 glyphs in a pfb ... the glyphname is what links them
index in tfm -> name -> index in pfb
> Also, I have another question, is there ability to load PK font file
> (generated from MetaFont)? Specifying metric file (tfm) and encoding
> vector (enc) should work similarly (or maybe same?) as for Type 1 PFB
> font.
sure, i can do that (omitting the pfb entry will then revert to bitmaps
plus a bit of safeguarding against inconsistent names and so) but keep
in mind that a mixture in one document will then always use the outline
(as the map entry wins)
>> (It uses a few helpers from the existing font code, like cached
>> loading and glyph names to unicode mapping using the enc file which
>> saves resources and is also more generic than hard coded font
>> vectors. It's still a pitty that these csr fonts don't come as a
>> full package like plr which has afm files too; in which case the
>> regular afm/pfb loader could be used instead. I only tested
>> csr10.tfm / csr10.pfb / css.enc as I don't want to install the whole
>> lot.
>
> If one is working, others must too.
>
> Where I can find your changes, so I could test it? Ideally if I could
> download tex/lua files into working directory and use system luatex
> instead building whole texlive and luatex from some sources...
you have to wait till i update context and then fetch it from the
context garden (i'll update later today)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list