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

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

问题描述

有没有人有任何指针,我可以找到关于如何创建一个CFF字体的opentype包装的额外信息?

目前我有一个CFF文件的解析器,所以我可以从中获得各种信息(cmap,字形名称,宽度,名称等)。鉴于此信息,我无法创建一个Opentype(truetype格式)包装,所以我可以使用GDI Windows上的字体; GDI不会加载Opentype字体,我唯一知道的就是加载字体失败。

有谁知道任何额外的信息,验证应用程序,示例代码,获取额外的信息,为什么字体不从Windows等加载等?



注意:我正在寻找信息如何做,而不是公用事业和/或转换工具。 / b>

解决方案

现在利用,我有3个库作为参考:


  1. FreeType:主要在cff包中,main入口是cff \cffload.c,现在在github中

  2. FontForge:fontforge \parsettf.c,仍然在sf .net

  3. fonttools:fonttools \cffLib.py,在sf.net中

  4. 工具: http://code.google.com/p/ots/source/browse/trunk/src/cff .cc

在parsettf.c中,George Williams写道:True Type是一种非常糟糕的格式。 ...现在我更好地理解它似乎更好的设计,但文件仍然存在冲突。有时候很糟糕。

IMO,这个cff文件同样不好。
也许它更好的设计。只是也许,如果我有时间:)我会确认也许。为什么?看看那些东西的创建时间太老了。

只有年纪大了才更好?家长,数学和神智学:)
其他人必须上课!


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

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.

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.

解决方案

Util now, I got 3 libraries as reference:

  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

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, 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天全站免登陆