[luatex] luatex - font encoding for type 1 fonts

Pali Rohár pali.rohar at gmail.com
Sat Jun 25 15:16:31 CEST 2016


On Saturday 25 June 2016 14:51:17 Hans Hagen wrote:
> On 6/25/2016 12:30 PM, Pali Rohár wrote:
> > On Friday 24 June 2016 16:03:11 Hans Hagen wrote:
> >> On 6/24/2016 2:18 PM, Pali Rohár wrote:
> >>> On Friday 24 June 2016 14:14:24 Hans Hagen wrote:
> >>>> On 6/24/2016 2:10 PM, Pali Rohár wrote:
> >>>>> On Friday 24 June 2016 14:01:25 Hans Hagen wrote:
> >>>>>> On 6/24/2016 1:33 PM, Pali Rohár wrote:
> >>>>>>>> (2) the several
> >>>>>>>> cs related packages don't seem to come with afm files,
> >>>>>>> 
> >>>>>>> Not several, but all! Metrics are stored in ftm files, e.g.
> >>>>>>> csr10.tfm. For each font there is metafont source code, tex
> >>>>>>> metrics and for some also type1 variant (as pfb file):
> >>>>>>> csr10.mf csr10.tfm csr10.pfb
> >>>>>> 
> >>>>>> afaiks no afm files
> >>>>> 
> >>>>> And why do you need afm files? Are not TeX metrics (tfm)
> >>>>> enough?
> >>>> 
> >>>> then you can just load the font (given that the afm matches the
> >>>> pfb)
> >>> 
> >>> AFM file contains just font metrics, right? Why is TFM file
> >>> (which contains also metrics) usable? What I trying understand
> >>> is where is the problem as until now TFM + PFB was enough...
> >> 
> >> because afm/pfb files contain info about what characters we have
> >> while the tfm file only has metrics (in which case one also needs
> >> to interpret the encoding vector)
> > 
> > Do you have some link about description of AFM and TFM files?
> > 
> > IIRC, PFB file has vector of glyph names. So from this information
> > can be generated encoding font table as for each glyph name can be
> > assigned unicode character. And this could work for any Type 1
> > font in PFB format Or I'm missing something?
> 
> an afm file has the metrics as well as the kerns and ligature info;
> the pfb is needed to sort out the glyph index (there is a name <->
> index mapping in between)
> 
> normally a pfb file ships with an afm file (from that one can make a
> tfm); if i'm bored i can make a tfm to afm converter but even then
> there might be some hand-crafting needed so better make sure the csr
> fonts ship as a proper pfb/afm package

Problem is that there are no AFM files for CSFonts (and IIRC never 
were). CSFonts are written in MetaFont and (from which were generated 
TFM files) and some subset of CSFonts (those which are often used) were 
later converted to Type 1 variant... Probably nobody generated yet AFM 
files for CSFonts as they were not needed, TeX handle just TFM files.

So if AFM files are really needed and combination PFB+TFM plus MetaFont 
source code is not enough, how to correctly generate AFM files?

And why cannot be still used TFM files which contains all kerns and 
ligature information?

-- 
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/20160625/664c23bd/attachment.bin>


More information about the luatex mailing list