How to draw Wingdings 2 characters outside of the 0..255 range in .NET?

Posted by romkyns on Stack Overflow See other posts from Stack Overflow or by romkyns
Published on 2010-04-09T21:35:15Z Indexed on 2010/04/09 21:53 UTC
Read the original article Hit count: 314

Filed under:
|

The standard windows Charmap utility shows quite a few characters in the "Wingdings 2" font whose character codes are greater than 255 - for example, 0xE4E shows a hand.

However, if I try to draw these characters as follows:

g.DrawString(new string((char) 0xE4E, 1), new Font("Wingdings 2", 20), brush, x, y);

then all I get is a standard "box" replacement character. This is weird, because the above code works for Wingdings 2 symbols between 0x21 and 0xFF, and also works for ALL symbols in, say, Arial Unicode MS.

How can I draw those characters from this particular font? Is there a separate API?

(Win7; .NET 3.5 SP1)


P.S. Here's the weird Character Map font with the duplicated character ranges:

charmap

© Stack Overflow or respective owner

Related posts about gdi+

Related posts about .NET