freetype
[Top][All Lists]
Advanced

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

Re: Virtual Fonts & "FTL", was Re: Merging TTF files?


From: Werner LEMBERG
Subject: Re: Virtual Fonts & "FTL", was Re: Merging TTF files?
Date: Wed, 27 Sep 2000 09:35:20 +0200 (CEST)

> > > 1) Load more than one TrueType font at a time -- i.e.  overload
> > > them successively, leaving unassigned characters as they were?

This doesn't work in general.  Remember that FreeType handles glyphs,
not characters.  Your suggestion would imply that there is a 1:1
relation between characters and glyphs which isn't true.

> Another question would be whether this should perhaps be handled by
> the application.  Yudit, as I said, appears to do this with X11
> fonts.  If the interface to FreeType is similar enough, maybe the
> easiest solution would be to modify the Yudit source.

I think the same, but note that you can't compare X11 with FreeType
directly because of the character/glyph problem.

> In either case, one would have to sense when the font had "given up"
> and returned a default character, instead of a correctly formatted
> character (it'd be nice if the FreeType API would let you figure
> this out).

That's easy.  Just use FT_Get_Char_Index().  If the returned value is
zero, you know that the font has no proper glyph for the given
character.

> Or else, one could simply define ranges for each font (i.e. don't
> overload, just use an outside code page mapping file to tell which
> ranges come from which font).

Only TrueType (resp. OpenType) fonts support this using the Unicode
range data in the OS/2 font table (look into the ttnameid.h header
file).  Maybe it is possible to guess the right bits for non-TrueType
fonts -- this would be a nice additional module.

> Or maybe this should be a thin layer between FreeType and the
> application -- i.e. just capture requests and remap them to the
> appropriate font via FreeType?  This would seem to favor the code
> page tables approach.

This is application specific, I think.


    Werner



reply via email to

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