freetype
[Top][All Lists]
Advanced

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

Re: [ft] needed functionality


From: George Williams
Subject: Re: [ft] needed functionality
Date: 08 May 2008 13:40:13 -0700

On Wed, 2008-05-07 at 05:00, Bram Tassyns wrote:
> The italic angle of a font
>     /// the angle, expressed in degrees counterclockwise from the vertical,
>     /// of the dominant vertical strokes of the font.
This is stored in the 'post' table for ttf/otf and the ItalicAngle entry
in the FontInfo dictionary of a type1 font.
> 
> check if the lowercase characters are scaled down upper case
Er... No good way to do that. Without image processing on your part,
that is.
> 
> check if the font resembles cursive handwriting
No good way to do that. 
  You could check the Panose field of the OS/2 table. A Family value of
Script would be indicative, but often this is left unset.
  Or you could check the IBM Family field of the OS/2 table. Again,
often this will be unset.
> 
> check if the font has serifs
>     /// a font has serifs if the glyphs have short strokes drawn at an angle
>     /// on the top and bottom of glyph stems
No good way to do that without image processing on your part.
Again you can look at PANOSE and IBM Family for suggestions.
> 
> get the horizontal stem width
>         /// the thickness, measured vertically, of the dominant horizontal
> stems of glyphs in the font.
For PostScript type fonts (type1 and otf) this is stored in the StdHW
and StemSnapH fields of the Private dictionary. StdHW is a single
element array (I don't know why it's an array, it just is) which
contains the most common horizontal stem width. StemSnapH is an array
which also includes less common stem widths.

For TrueType you'd have to do the image processing yourself.
> 
> get the vertical stem width
>     /// the thickness, measured horizontally, of the dominant vertical stems
> of glyphs in the font.
Same answer as above (Except that the field names are StdVW and
StemSnapV)
> 
> check if a font belongs to a certain vendor
Look at the copyright notice.
For ttf/otf you could look at the Vendor ID field of the OS/2 table.
> 
> check the license permissions of a font
No good away.
  Licenses are stored in human readable format. There have been
proposals to store licenses in a machine readable format, but as yet
none has gotten very far.
> 
> search for the character code in a specific charmap that belongs to a GID
Not all GIDs map to code points. GIDs can also map to multiple code
points.
  You'd have to run through the encoding to see what turned up, things
are optimized for the other direction.
> 
> check if a glyphname/character code is defined by the font or if the notdef
> character is substituted
  FreeType provides you with a mapping from unicode to GID.





reply via email to

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