LoginSignup
26
23

More than 5 years have passed since last update.

合成フォント作成環境つくる

Last updated at Posted at 2015-01-27

なんで

  • gvim 日本語きれいにしたい
    • そこまでひどくはないものの、日本語の表示に違和感がある
  • powerline 対応もしたいので Powerline Patched でかつ和文フォント merged なフォントがほしい
  • 自分好みな合成フォントをたくさん時間かけずにつくりたい

どうする

  • fontforge いれる
    • homebrew にあるし楽
    • GUI で確認とりたいケース想定して \--with-x11 オプションつける
    • なるべく自動化したいのでメインは CLI の利用

いつのまにかサイトが今っぽくなってた。

FontForge is a font editor

インストール

$ brew info fontforge

fontforge: stable 20141230 (bottled)
https://fontforge.github.io
/usr/local/Cellar/fontforge/20141230 (1291 files, 34M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/fontforge.rb
==> Dependencies
Build: autoconf ✔, automake ✔, pkg-config ✔
Required: libtool ✔, gettext ✔, pango ✔, zeromq ✔, czmq ✔, fontconfig ✔, cairo ✔
Recommended: libpng ✔, jpeg ✔, libtiff ✔
Optional: giflib ✘, libspiro ✘

==> Options

--with-giflib
        Build with GIF support
--with-libspiro
        Build with libspiro support
--with-x11
        Build with x11 support
--without-jpeg
        Build without jpeg support
--without-libpng
        Build without libpng support
--without-libtiff
        Build without libtiff support

==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/qurage/.local/lib/python2.7/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/qurage/.local/lib/python2.7/site-packages/homebrew.pth

$ brew uninstall fontforge                                                                                              
Uninstalling /usr/local/Cellar/fontforge/20141230...

$ brew prune && brew cleanup                                                                                            
Pruned 0 dead formulae
Tapped 45 formulae
Pruned 0 symbolic links and 20 directories from /usr/local
Removing: /usr/local/Cellar/openssl/1.0.1l...
Removing: /Library/Caches/Homebrew/openssl-1.0.1l.yosemite.bottle.tar.gz...

$ brew install fontforge --with-giflib --with-libspiro --with-x11
==> Installing dependencies for fontforge: giflib, libspiro
==> Installing fontforge dependency: giflib
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/giflib-4.1.6.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring giflib-4.1.6.yosemite.bottle.2.tar.gz
?  /usr/local/Cellar/giflib/4.1.6: 39 files, 724K
==> Installing fontforge dependency: libspiro
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libspiro-20071029.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring libspiro-20071029.yosemite.bottle.1.tar.gz
?  /usr/local/Cellar/libspiro/20071029: 7 files, 56K
==> Installing fontforge
==> Downloading https://github.com/fontforge/fontforge/archive/20141230.tar.gz
######################################################################## 100.0%
==> ./bootstrap
==> ./configure --prefix=/usr/local/Cellar/fontforge/20141230 --disable-silent-rules --with-x
==> make
==> make install
Warning: fontforge dependency gettext was built with a different C++ standard
library (libc++ from clang). This may cause problems at runtime.
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/qurage/.local/lib/python2.7/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/qurage/.local/lib/python2.7/site-packages/homebrew.pth
==> install_name_tool -change @executable_path/../Frameworks/Breakpad.framework/Versions/A/Breakpad /usr/local/Cellar/fontforge/20141230/bin/fontforge /usr/local/Cellar/fontforge/20141230/share/fontforge/osx/FontForge.app/Contents/Frameworks/Breakpad.framework/Versions/A/Breakpad
==> Summary
?  /usr/local/Cellar/fontforge/20141230: 1293 files, 44M, built in 5.4 minutes
brew install fontforge --with-giflib --with-libspiro --with-x11  607.53s user 147.28s system 227% cpu 5:31.29 total

brew linkapps は使えないぽい

はよ

ふつうにコマンドラインで $ fontforge で GUI 起動する。

詳細

$ brew linkapps/Applications/FontForge.app のシンボリックリンクを作成して起動しようとすると、 "_FontForge is in the wrong folder on your computer." というダイアログが出るのみで起動できない。

FontForge is in the wrong folder on your computer.

$ brew linkapps
    :
Linking /usr/local/opt/fontforge/FontForge.app
    :
Finished linking. Find the links under /Applications.

$ la /Applications/fontforge.app
lrwxr-xr-x  1 qurage  admin  38 Jan 25 09:39 /Applications/fontforge.app -> /usr/local/opt/fontforge/FontForge.app

ぐぐったら関係ありそうな github issue あった。

$ brew linkapps によるシンボリックリンクではなく、 /Applications に app を move しろとのこと。

on 6 Dec 2014 | Homebrew OS X install broken · Issue #1971 · fontforge/fontforge

davelab6 commented on 6 Dec 2014:

Homebrew installs FontForge at /usr/local/Cellar/fontforge/, but then it instructs the user to “run brew linkapps to symlink these to /Applications”. Doing so and then double clicking the resulting “FontForge” symlink at /Applications returns this error:

Please move the FontForge.app to your system /Applications folder.

$ rm /Applications/FontForge.app
remove /Applications/FontForge.app? y
/Applications/FontForge.app

$ cp -R /usr/local/Cellar/fontforge/20141230/share/fontforge/osx/FontForge.app /Applications/
   :

FontForge.app アイコンをクリックしてもダイアログは出なくなったものの、何も起こらない。

github issue 続きのコメントにコマンドラインで起動すると GUI のやつ起動すると書いてあったので試したら起動した。

on 6 Dec 2014

DomT4 commented on 6 Dec 2014

Fontforge launches fine if you call it from the CLI rather than using the App bundle button. So brew install fontforge --with-x11 and then from the command line fontforge. That'll launch the GUI for you.

$ fontforge
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 06:47 JST 26-Jan-2015-ML-D.
 Based on source from git with hash:
no xdefs_filename!
TESTING: getPixmapDir:/usr/local/share/fontforge/pixmaps
TESTING: getShareDir:/usr/local/share/fontforge
TESTING: GResourceProgramDir:/usr/local/bin
trying default theme:/usr/local/share/fontforge/pixmaps/resources
fontforge.hasUserInterface!
PyFF_onAppClosing() cnt:1

fontforge splash image

26
23
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
23