我们如何知道真正的类型字体是否具有高于0xFFFF的代码点? [英] How do we know if a true type font has code points above 0xFFFF?
本文介绍了我们如何知道真正的类型字体是否具有高于0xFFFF的代码点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何知道真正类型的字体是否具有高于0xFFFF的代码点?
解决方案
有一个API(GetFontUnicodeRanges / GetGlyphIndices),但它不会超过0xFFFF,因为我怀疑你知道。 / p>
有两种显而易见的方法可以找到程序:
- 解析< c $ c> .ttf 文件(规范 a> is open-ish)
- 尝试测量您感兴趣的字符的输出,并将测量结果与已知的替换字符进行比较
这个答案有一个.NET / C#解决方案:获取字体支持的字符 - 在C#
How do we know if a true type font has code points above 0xFFFF ?
解决方案
There's an API (GetFontUnicodeRanges/GetGlyphIndices), but it doesn't go above 0xFFFF, as I suspect you know.
There are 2 obvious methods for finding out programatically:
- Parse the
.ttf
file (the spec is open-ish) - Try and measure the output of the characters you are interested in and compare the measurements to the known replacement character
This answer has a .NET/C# solution: Get supported characters of a font - in C#
这篇关于我们如何知道真正的类型字体是否具有高于0xFFFF的代码点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文