[luatex] luatex - font encoding for type 1 fonts
Hans Hagen
pragma at wxs.nl
Sun Jun 26 15:24:11 CEST 2016
On 6/26/2016 1:25 PM, Pali Rohár wrote:
> But I'm trying to point something else, that csr.enc file does not have
> to be specified.
>
> File csr.enc contains:
>
> /il2Encoding [
> /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon
> ...
> /quotedblbase /csquotedblright
> ] def
>
> File csr10.pfb contains:
>
> /FontName /csr10 def
> /Encoding 256 array
> 0 1 255 {1 index exch /.notdef put} for
> dup 0 /Gamma put
> dup 1 /Delta put
> dup 2 /Theta put
> dup 3 /Lambda put
> dup 4 /Xi put
> dup 5 /Pi put
> dup 6 /Sigma put
> dup 7 /Upsilon put
> ...
> dup 254 /quotedblbase put
> dup 255 /csquotedblright put
> readonly def
> ...
> 2 index /CharStrings 183 dict dup begin
> /Xi {
> ...
> }
> /dotlessi {
> ...
> }
> /oslash {
> ...
> }
> ...
>
> So glyphs are really in random order in csr10.pfb file (first is /Xi,
> second /dotlessi, ...) but at beginning of csr10.pfb file is /Encoding
> table where is that mapping from index to glyph name. Same what is in
> csr.enc file.
>
> And I'm trying to tell you that in this case (when /Encoding array in
> pfb file is available), external *.enc is not needed to specify. Looks
> like that pdftex uses this /Encoding array.
the enc files shows what glyphs (by name) are in the tfm file and the
vector in the pfb file tels what glyphs (by name) are in what slot ..
these are different indexes and the name makes it possibel to go from
the tex one to the pfb one
(for adobe standard encoding it in parallel but tex encodings are hardly
standard)
> 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
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