freetype-devel
[Top][All Lists]
Advanced

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

Re: FT_Get_Char_Index() returns 0 for char(0x020)


From: Werner LEMBERG
Subject: Re: FT_Get_Char_Index() returns 0 for char(0x020)
Date: Sun, 15 Oct 2000 23:02:25 +0200 (CEST)

> > It is important, however, to check face->unicode_map->num_codes
> > after a call to Z1_Init_Face() to see how many glyphs can be
> > mapped at all.  Maybe we should move this field to FT_CharMapRec
> > so that the user can access this number for all font formats in a
> > uniform way.  Of course, only for synthesized mappings this value
> > has significance; for real charmaps it should be set equal to -1
> > or something else.
> 
> Let's see, a Type 1 font has a synthesized mapping,

Yes.

> and a TT font without a Unicode cmap has a synthesized mapping?

No.

> That is, a cmap that is built based on what glyphs are defined in
> the glyf table (or CharStrings dictionary)?

If the font is a wrapped PS font it is probably useful (as you've
indicated) to synthesize a charmap directly from the wrapped font in
addition to the original charmaps.  I don't know...

> If, on the other hand, the font is a OTF or TT font, the cmaps are
> already predefined, so you would return -1 in theis case to indicate
> the mappings were built in?

Yes -- the field must be a `long', of course.

The idea is that the application gets a chance to evaluate the quality
of the synthesized charmap.  If, say, more than 20% of the glyphs are
not mapped, another charmap should be used.  Do you know a better way
for a quality check?


    Werner



reply via email to

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