0

我正在开发一个fontcustom用于构建一些自定义图标的预先存在的项目。我不是创建图标的人,我在部署方面。创建图标的设计者能够在他的 Mac 上很好地“编译”,但我无法让它在一个Ubuntu 14.04.3 LTS盒子上工作,我正在尝试自动化这个特定应用程序的所有构建和部署步骤.

我正在使用fontcustom v-1.3.8. 这是使用其 github 页面上的说明安装的:

sudo apt-get install fontforge
wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
gem install fontcustom

当我跑步时,fontforge --version我得到:

Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Based on sources from 02:23 UTC  5-Apr-2016-ML-D.
 Based on source from git with hash: 94038cd93f463ae5020b722a518c65abc843a79a
no xdefs_filename!
TESTING: getPixmapDir:/usr/share/fontforge/pixmaps
TESTING: getShareDir:/usr/share/fontforge
TESTING: GResourceProgramDir:/usr/bin
trying default theme:/usr/share/fontforge/pixmaps/resources
fontforge 02:23 UTC  5-Apr-2016
libfontforge 20160405

现在,当我实际运行时,fontcustom compile --debug我得到:

       debug  Using settings from `fontcustom.yml`.
       debug  Using options:
                {:input=>{:vectors=>"vectors", :templates=>"templates"},
                :output=>
                 {:fonts=>"fonts",
                  :"_font-icons.scss"=>"../../scss/base/icons",
                  :"_icon-font.scss"=>"../../scss/base/icons",
                  :css=>"fonts",
                  :preview=>"fonts"},
                :config=>"fontcustom.yml",
                :templates=>["_font-icons.scss", "_icon-font.scss"],
                :font_name=>"icons",
                :font_design_size=>16,
                :font_em=>512,
                :font_ascent=>448,
                :font_descent=>64,
                :css_selector=>".icon-{{glyph}}",
                :preprocessor_path=>nil,
                :autowidth=>false,
                :no_hash=>true,
                :debug=>true,
                :force=>false,
                :quiet=>false}
       debug  Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
               License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
               with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
               Based on sources from 02:23 UTC  5-Apr-2016-ML-D.
               Based on source from git with hash: 94038cd93f463ae5020b722a518c65abc843a79a
              Save Failed
              Traceback (most recent call last):
                File "/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/scripts/generate.py", line 99, in <module>
                  font.generate(fontfile + '.ttf')
              EnvironmentError: Font generation failed
       error  `fontforge` compilation failed.
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/generator/font.rb:92:in `create_fonts'
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/generator/font.rb:20:in `generate'
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/base.rb:50:in `start_generators'
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/base.rb:22:in `compile'
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/lib/fontcustom/cli.rb:77:in `compile'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/var/lib/gems/1.9.1/gems/fontcustom-1.3.8/bin/fontcustom:5:in `<top (required)>'
/usr/local/bin/fontcustom:23:in `load'
/usr/local/bin/fontcustom:23:in `<main>'

我有一种感觉,我错过了一些图书馆。我在网上找到的大多数信息都与 Mac 有关,并且经常提到重新安装 fontforge 和/或确保安装了各种 lib 依赖项。我已经尝试安装python-fontforge, ttfautohint, ruby-dev,woff-tools并且仍然没有爱。

我在跑步ruby 1.9.3p484

对此的任何帮助将不胜感激。

4

1 回答 1

0

问题不在于 Fontcustom 本身,而在于 Fontforge。

Homebrew 安装了一个不同(阅读:更新)的 fontforge 版本apt-get

要更正此问题,您必须在 Linux 上手动安装正确的 fontforge 版本。

sudo add-apt-repository ppa:fontforge/fontforge
sudo apt-get update
于 2018-05-15T12:54:45.633 回答