以编程方式将CFF字体转换为OpenType字体 [英] Convert CFF fonts into OpenType fonts programmatically

查看:531
本文介绍了以编程方式将CFF字体转换为OpenType字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人在我可以找到有关如何围绕CFF字体创建opentype包装器的附加信息的任何指针吗?

Does anyone have any pointers where I can find extra information on how to create an opentype wrapper around a CFF font?

目前,我有一个用于CFF文件的解析器,因此我可以从中获取各种信息(cmap,字形名称,宽度,名称等).鉴于此信息,我无法创建Opentype(类似truetype格式)包装,因此我可以在Windows上使用GDI来使用字体. GDI不会加载Opentype字体,我唯一知道的是它无法加载该字体.

Currently I have a parser for CFF files so I can get all sorts of information out of it (cmap, glyph names, widths, names etc etc). Given this information I am unable to create an Opentype (truetype format like) wrapper so I can use the font on Windows using GDI; GDI will not load the Opentype font and the only thing I know is that it fails to load the font.

有人知道任何其他信息,验证应用程序,示例代码,以及为什么无法从Windows等加载字体的其他信息吗?

Does anyone know any additional information, validation applications, example code, get additional information why the font does not load from Windows etc etc?

注意:我正在寻找信息,而不是实用程序和/或转换工具.

Note: I am looking for information how to do it, not utilities and/or conversion tools.

推荐答案

现在,我得到3个库作为参考:

Util now, I got 3 libraries as reference:

  1. FreeType:主要位于cff包中,并且主要条目是cff \ cffload.c,现在位于github
  2. FontForge:fontforge \ parsettf.c,仍在sf.net中
  3. fonttools:sf.net中的fonttools \ cffLib.py
  4. ots工具: http://code.google .com/p/ots/source/browse/trunk/src/cff.cc
  1. FreeType: mainly in cff package, and main entry is cff\cffload.c, now in github
  2. FontForge: fontforge\parsettf.c, still in sf.net
  3. fonttools: fonttools\cffLib.py, in sf.net
  4. ots tools: http://code.google.com/p/ots/source/browse/trunk/src/cff.cc

在parsettf.c中,乔治·威廉姆斯(George Williams)写道:True Type是一种非常讨厌的格式. ...现在,我对它的理解更好了,它的设计似乎更好,但是文档仍然存在冲突.有时很糟糕.

In parsettf.c, George Williams write: True Type is a really icky format. ...now that I understand it better it seems better designed but the docs remain in conflict. Sometimes badly so.

IMO,cff doc同样不好. 也许设计得更好.也许吧,如果我有时间的话:)我会确认一下.为什么?看看那些东西的创建时间,太旧了.

IMO, the cff doc same bad. Maybe it better designed. Just maybe, if I have time:) I will confirm the maybe. Why? look at the creation time of those thing, too old.

只有年龄大些才更好?父母,数学和哲学:) 其他必须更新的东西!

What is better only if older? Parent, math and filosophy:) Anything others must uptodate!

这篇关于以编程方式将CFF字体转换为OpenType字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆