freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] .afm parsing


From: Werner LEMBERG
Subject: Re: [Devel] .afm parsing
Date: Wed, 05 Jun 2002 21:33:24 +0200 (CEST)

> > How shall this work?  For example, groff's metric files contain
> > additional information not available in the AFM files.  Do you
> > suggest that this data is added to the AFM files?
>
> I don't find data in the groff metric files that I examined which
> isn't present in the .AFM files; looking at the groff_font manual
> page I couldn't find anything obvious either.  I must just be
> missing something.

Have a look at the afmtodit man page.

. The `special' keyword.

. The slant value should be modified sometimes for better accent
  positioning within groff.

. Italic correction (left/right/subscript).

Note that I don't oppose to your ideas, but the data in AFM files is
not always sufficient.

Consider math fonts for TeX!  Here the data is really not enough.  For
example, here some comments from the AFM file for lbmstex (this is
part of Y&Y's lumath package):

  Comment following is extra info for TFM file
  Comment Comment FontID LBMS
  Comment DesignSize 10 (pts)
  Comment CharacterCodingScheme TeX math symbols
  Comment Space 0 0 0 
  Comment ExtraSpace 0
  Comment Quad 1000   
  Comment Num 700 500 500
  Comment Denom 720 360  
  Comment Sup 420 370 290
  Comment Sub 150 250
  Comment Supdrop 400
  Comment Subdrop 50 
  Comment Delim 2500 1200
  Comment Axisheight 313 

To make your plan work successfully, you have to either extend the AFM
format or to introduce some kind of metacomments which can be parsed
by FreeType to get the extra data.  For math fonts tfm->afm is a loss
of data.

My guess is that perhaps the majority of fonts can be represented by
AFMs but not all.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]