On Sunday 26 June 2016 15:24:11 Hans Hagen wrote:
> 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)So above /Encoding 256 array in PFB file can be different as encoding vector in ENC file? I thought that they should be same... 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. 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. Meaning: Use ENC file if possible, but when user not specified it --> fallback to /Encoding array in PFB file. > > 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? -- Pali Rohár [email protected]
signature.asc
Description: This is a digitally signed message part.
