[luatex] luatex - font encoding for type 1 fonts

Pali Rohár pali.rohar at gmail.com
Sun Jun 26 17:16:01 CEST 2016

On Sunday 26 June 2016 16:32:47 Hans Hagen wrote:
> On 6/26/2016 4:22 PM, Pali Rohár wrote:
> > So above /Encoding 256 array in PFB file can be different as
> > encoding vector in ENC file? I thought that they should be same...
> indeed

So thank you for clarification.

> > Anyway I tested pdftex and it does *not* use ENC file, encoding
> > takes from /Encoding 256 array from PFB file. And Linux strace
> > program proved that no enc file was opened during pdftex run.
> then you're lucky that they match

This is how pdftex uses it, so I think they were tested to work 
correctly with pdftex/tex (and not with another font software).

Apparently, some font styles of CSFonts have different mapping of glyph 
names as basic roman style csr. Looks like /Encoding 256 array is 
correct in all PFB files (only problem with Knuth's dollar-sterling 

But encoding ENC files (there are four in fonts/enc/dvips/cs/ on my 
TeXLive distribution) are not correct as I see at least 6 different 
encoding of CSFonts.

So currently for CSFonts it is better to *not* use csr.enc files...

I will report these problem to maintainer of CSFonts that enc files 
needs to be fixed, updated and added new missing...

> > So to mimic pdftex behaviour (and how CSFonts Type 1 are
> > read/parsed) I would really propose to use /Encoding 256 array
> > from PFB file when ENC file for font loader is not specified.
> it makes no sense to have all kind of assumptions built in for this
> rather non standard set of cs fonts
> > Meaning: Use ENC file if possible, but when user not specified it
> > --> fallback to /Encoding array in PFB file.
> can be done but as said keep in mind that it's non typical


> >>> I think it could be useful if that your loader was able to
> >>> understand command also when pfb file is not specified. It could
> >>> try to load either pfb file (preferred) or fallback to
> >>> PK/metafont.
> >> 
> >> the more hardcoded logic is in there, the harder it is to beat (i
> >> can impose some logic in context but want to stay away from
> >> intefreing in other macro packages logic)
> >> 
> >>> it has (internal/system pdftex.map) database of Type 1 fonts and
> >> 
> >> only system .. in luatex i never use map files
> > 
> > Ok, so luatex ignores any specified map files?
> no, the fontloader does not use/pass that info when using outline
> fonts


Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://tug.org/pipermail/luatex/attachments/20160626/1917586b/attachment.bin>

More information about the luatex mailing list