相关疑难解决方法(0)

找出字体支持的字符

如何从Linux上的TrueType或嵌入式OpenType字体中提取受支持的Unicode字符列表?

是否有工具或库可用于处理.ttf或.eot文件并构建字体提供的代码点列表(如U + 0123,U + 1234等)?

linux fonts truetype opentype

57
推荐指数
7
解决办法
2万
查看次数

如何确定哪些字体包含特定字符?

给定一个特定的Unicode字符,让我们说吗,如何迭代系统中安装的所有字体并列出包含该字符字形的字体?

.net c# fonts

11
推荐指数
1
解决办法
4507
查看次数

如何在基于Debian的系统上找到字体具有字形的Unicode代码点?

从基于Debian的系统上的脚本语言(Python或Ruby),我想找到以下任何一种:

  1. 特定字体具有字形的所有Unicode代码点
  2. 所有具有特定Unicode代码点字形的字体

(显然,1或2可以从另一个派生,所以无论什么更容易都会很棒.)我在过去通过运行完成了这个:

fc-list : file charset
Run Code Online (Sandbox Code Playgroud)

...并根据来自fontconfig的代码解析每行末尾的输出, 但在我看来应该有一种更简单的方法.

(我不完全确定这是这个问题的正确StackExchange站点,但我正在寻找可以以编程方式使用的答案.)

ruby python unicode fonts fontconfig

10
推荐指数
1
解决办法
1605
查看次数

检查字体是否支持某些字符

我在StackOverflow上发现了这个:有没有办法以编程方式确定字体文件是否具有特定的Unicode字形?

但是,我还需要检查UTF-32字符.我想要做的是在unicode.org上解析Unihan数据并忽略"Arial Unicode MS"不支持的所有字符.我开始研究CheckIfCharInFont()方法,修改arg取一个字符串(对于utf-32)并检查它是否是一个代理对.然后我通过做一个char.ConvertToUtf32(surrogate1,surrogate2)得到Int32,但问题是当前的CheckIfCharInFont()方法只支持Uint16 ...你可以看到我放置了一个"Debugger.Break",这是有点一个问题.那里的任何专家可以帮我解决这个问题吗?

谢谢

public static bool CheckIfCharInFont(string character, Font font)
        {
            UInt16 value = 0;
            int temp = 0;
            if (character.Length > 1) //UTF-32
            {
                temp = char.ConvertToUtf32(character[0], character[1]);
            }
            else
            {
                temp = (int)character[0];
            }

            if (temp > UInt16.MaxValue)
            {
                Debugger.Break();
                return false;
            }
            value = (UInt16)temp;

            //UInt16 value = Convert.ToUInt16(character);
            List<FontRange> ranges = GetUnicodeRangesForFont(font);
            bool isCharacterPresent = false;
            foreach (FontRange range in ranges)
            {
                if (value >= range.Low && value <= range.High)
                {
                    isCharacterPresent …
Run Code Online (Sandbox Code Playgroud)

unicode fonts

5
推荐指数
1
解决办法
4703
查看次数

标签 统计

fonts ×4

unicode ×2

.net ×1

c# ×1

fontconfig ×1

linux ×1

opentype ×1

python ×1

ruby ×1

truetype ×1