【问题标题】:Given a TTF font file, how do detect if it is an unicode or non-unicode?给定一个 TTF 字体文件,如何检测它是 unicode 还是非 unicode?
【发布时间】:2016-12-20 10:14:49
【问题描述】:

我正在尝试将 非 unicode 的 txt 文件转换为 unicodeTTF 字体文件是输入以及 txt 文件,以了解源和目标。

我如何从 TTF 字体文件中获取有关需要进行转换的信息?

【问题讨论】:

  • 查看 TrueType 字体的cmap 表。
  • 不管如何,您为什么认为这可以让您确定文件使用哪种编码?字体可以同时支持几种字符编码在同一个文件中,包括“非unicode”和“unicode”映射。
  • @Mike'Pomax'Kamermans 非常感谢!

标签: c# unicode fonts non-unicode


【解决方案1】:

您可以使用文件命令,请参见下面的示例:

$ file emoji.ttf 
emoji.ttf: TrueType Font data, 11 tables, 1st "OS/2", 14 names, Macintosh, type 1 
string, emojiVersion 1.1emojimj      

【讨论】:

    猜你喜欢
    • 2011-06-26
    • 2010-10-02
    • 1970-01-01
    • 1970-01-01
    • 2020-03-23
    • 1970-01-01
    • 2016-11-04
    • 2018-05-03
    • 2018-02-27
    相关资源
    最近更新 更多