开发者

Finding out what unicode characters are supported by a font in .NET 2.0

开发者 https://www.devze.com 2023-01-26 01:58 出处:网络
I need something that can provide the information GetFontUnicodeRanges provides, but I can\'t fi开发者_StackOverflow社区nd anything similar. I have to create a charmap-like control that will be used i

I need something that can provide the information GetFontUnicodeRanges provides, but I can't fi开发者_StackOverflow社区nd anything similar. I have to create a charmap-like control that will be used in a larger project. Any ideas?

Thank you.


Yes, that's what you'll need to pinvoke. Graphics.GetHdc() gets you a device context handle. Font.ToHfont() gets you a font handle. Pinvoke SelectObject to select the font into the device context and its ready for use. Be sure to restore everything when you're done. Visit pinvoke.net for the declarations you'll need.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号