开发者

How To: Determine which character ranges are supported by a font

开发者 https://www.devze.com 2023-01-11 21:31 出处:网络
When working with different fonts, some might support, say, arabic characters where another might not.

When working with different fonts, some might support, say, arabic characters where another might not.

Is there a wa开发者_运维知识库y in C# to figure out what character ranges are supported by a specific font?


You would need to P/Invoke GetFontUnicodeRanges(). Not easy to do because the font needs to be selected in the device context, that requires more p/invoke.

But most of all, it isn't the right thing to do. You should rely on Windows' automatic font linking, it finds another font if necessary to supply the glyph. The feature is described in this article.

0

精彩评论

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

关注公众号