freetype
[Top][All Lists]
Advanced

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

Re: [ft] FT_Get_Char_Index() does not work with Windings font


From: Werner LEMBERG
Subject: Re: [ft] FT_Get_Char_Index() does not work with Windings font
Date: Thu, 21 Mar 2019 13:51:09 +0100 (CET)

> [...] when I hand over the same 0x4100/"A" to FT_Get_Char_Index()
> when Windings-font is used, the function always returns 0 and the
> resulting vectors are just a caret.  The same is true for all other
> letters.
> 
> When I try "A" e.g. in Libreoffice with Windings-font, a valid
> symbol is shown.
> 
> So...any idea what is special with this font? What do I have to do
> to get the same symbols as they are shown e.G. in Libreoffice?

If you follow the link given in the documention of
`FT_ENCODING_MS_SYMBOL', you would eventually reach

  
https://docs.microsoft.com/en-us/typography/opentype/spec/recom#non-standard-symbol-fonts

which says

  The 'cmap' subtable (platform 3, encoding 0) must use format 4.  The
  character codes should start at 0xF000, which is in the Private Use
  Area of Unicode.  It is suggested to derive the format 4 encodings
  by simply adding 0xF000 to the format 0 (Macintosh) encodings.

So simply add 0xF000 to your character code values.


    Werner



reply via email to

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