16 May 2002 GrahamAsher
» (Journeyer)
I now have a very rough design worked out for the
incremental FreeType font system. The idea is to support
any kind of font loaded by GhostScript that can be added to
incrementally. I am doing this generically by designing an
interface that contains a very small number of functions
(well, two at the moment) for getting font information.
(It's a pain doing this in C - it would be easier and
cleaner in C++. I have argued ad nauseam for a C++ rewrite
of FreeType, and have actually done some of this work
myself, but not for public release unfortunately. So you
will have to take my word that it works like a Swiss watch;-
) ) Anyway,
the idea is that to open an incremental font, like, say, a
Type 42 font with no glyph table, you supply a new member
of FT_Open_Args that points to your object implementing the
new interface. FreeType stores this new arg in the FT_Face
object and uses its functions where appropriate - in this
case, to get glyph data from the PostScript font's
GlyphDirectory.