freetype
[Top][All Lists]
Advanced

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

[Freetype] Finding 'high noon' in wingding.ttf


From: Frensch,Kay
Subject: [Freetype] Finding 'high noon' in wingding.ttf
Date: Mon, 9 Jul 2001 17:55:15 +0200

Hi,

when trying to render the 12 o`clock symbol from Microsoft wingding.ttf
I use the (uni)code 00c2 charactercode.

I am using the following algorithm to find a suitable unicode character map:

        for (i = 0; i < faceProperties_.num_CharMaps; i++)
        {
                TT_Get_CharMap_ID( fontFaceHandle_, i, &platform,
&encoding);
                if ((platform == 3 && encoding == 1 ) ||
                        (platform == 0 && encoding == 0 ))
                {
                        TT_Get_CharMap(fontFaceHandle_, i, &charMap_);
                        break;
                }
        }
        
and to retrieve the charIndex:

        charIndex = TT_Char_Index(charMap_, utf16character);

Obviously Wingding.ttf does not contain such a unicode char map.
But the hack, found in some of the examples, does not work either.

        charIndex = (utf16character - ' ' + 1) < 0 ? 0 : (utf16character - '
' + 1);
        if (charIndex >= instance->get_fontFace()->get_numGlyphs())
        { charIndex = 0; }

I assume that the charIndex is the offset of the glyph in the fontfile and
has nothing
to do with the encoding in a certain operating system. For 'normal'
character fonts
I am finding unicode charmaps that give the correct charIndex, but not for
symbol fonts.

Where to search for more information on how to find 'high noon' in
wingding.ttf?

Thanks in advance, Kay.
PS.: I still use FT 1.3.1, but the question seems more general.

Kay Frensch    - http://www.draeger.com mailto:address@hidden





reply via email to

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