我正在开发一个使用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
。
对此有任何帮助将不胜感激。
答案 0 :(得分:0)
问题不在于Fontcustom本身,而在于Fontforge。
Homebrew安装了一个与apt-get
不同的(读取:更新)fontforge版本。
要解决此问题,您必须在Linux上手动安装正确的fontforge版本。
sudo add-apt-repository ppa:fontforge/fontforge
sudo apt-get update