【问题标题】:fontforge python bindings with macports与 macports 的 fontforge python 绑定
【发布时间】:2012-04-01 12:12:28
【问题描述】:

我在 Mac OS X 上,我想使用像 this one 这样的 python 脚本来使用 fontforge 操作 OTF。问题是,我如何访问 fontforge?我需要为此进行特殊构建吗?

这是我运行文件时得到的结果

Traceback (most recent call last):
  File "myfile.py", line 6, in <module>
    import fontforge
ImportError: No module named fontforge

(第 6 行是import fontforge

【问题讨论】:

  • 你可能想关注这张票:trac.macports.org/ticket/31852
  • @trygvis 谢谢,这就是我现在要做的。
  • @topskip 我想知道你是否记得你是否或如何最终解决了这个问题?谢谢。
  • @FromWhereToWhere 我不记得了,我想我放弃了。
  • @topskip 感谢您的回复。我实际上只是切换到 Ubuntu 并将其安装为 here: $ sudo apt-get install fontforge python-fontforge

标签: python macports fontforge


【解决方案1】:

首先卸载你当前安装的:

port uninstall fontforge

然后安装python变体:

port install fontforge +python27

还有一个 python26 变体。查看所有变体port variants fontforge

【讨论】:

    【解决方案2】:

    您可以通过 HomeBrew 获取 FontForge 开发版的 python 模块:

    $ brew install python
    $ brew install fontforge --HEAD
    

    【讨论】:

      猜你喜欢
      • 2011-01-02
      • 2014-06-01
      • 2012-01-14
      • 2014-02-09
      • 1970-01-01
      • 2011-04-18
      • 1970-01-01
      • 2018-04-24
      • 1970-01-01
      相关资源
      最近更新 更多