freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Character mapping - HELP?


From: Antoine Leca
Subject: Re: [Devel] Character mapping - HELP?
Date: Mon, 05 Mar 2001 19:11:19 +0100

Niels A. Moseley wrote:
> 
> I want to render strings that normally get passed to the ExtTextOut
> function in Windows. All works well until I come across the Symbol.ttf font
> in conjunction with the 'ft_encoding_symbols' character map encoding.

I did not fully analyse your problem, but this is a common (and known)
pitfall.

Symbol (and some others like Wingding) is a special font. It is noticed
by Windows (through I_do_not_remember_which_mechanism) as needing some
sort of translation, primarly for backward compatibility reasons.

If you analyse the font (the .TTF) itself, you should see that it is
encoded as 0xF020 -> 0xF0FF (IIRC), with a special note that the charmap
is 3,0, and not 3,1 as usual with Microsoft fonts.

Althought I believe you can correctly write using this range in Windows,
if you pass values in the 32-255 (0x20 - 0xFF) range, behind the scene
Windows do some kind of remapping. I never checked that carefully, but
I remember reading that it takes the lowest encoded character (i.e.
0xF020 in my example, but I believe this may varies), and map the space
character (0x20) to this glyph; and the others follow.


> Windows renders a 'theta' symbol when ExtTextOut is passed (BYTE)113. I
> want to mimic this behaviour.

I understand you have to provide the mechanism I described above.
Perhaps some people less busy than I am can comment and provide some links.


Antoine



reply via email to

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