プログラムやコーディングに最適なフォントらしいRictyのインストール手順です。
brewのインストールとかでエラーになったので、参考になればと思います。

事前準備

[code lang=”bash”]
$ brew install automake
$ brew install pkg-config
$ brew install autoconf
[/code]

トラブルシュート:brew-caskが権限周りでインストールできない

[code lang=”bash”]
$ brew install caskroom/cask/brew-cask
==> Installing brew-cask from caskroom/homebrew-cask
==&gt; Cloning <a href="https://github.com/caskroom/homebrew-cask.git">https://github.com/caskroom/homebrew-cask.git</a>
Updating /Library/Caches/Homebrew/brew-cask–git
==&gt; Checking out tag v0.53.3
Error: parent directory is world writable but not sticky
Please report this bug:
<a href="https://git.io/brew-troubleshooting">https://git.io/brew-troubleshooting</a>
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:92:in `mktmpdir’
/usr/local/Library/Homebrew/utils/fork.rb:6:in `safe_fork’
/usr/local/Library/Homebrew/formula_installer.rb:481:in `build’
/usr/local/Library/Homebrew/formula_installer.rb:184:in `install’
/usr/local/Library/Homebrew/cmd/install.rb:165:in `install_formula’
/usr/local/Library/Homebrew/cmd/install.rb:83:in `block in install’
/usr/local/Library/Homebrew/cmd/install.rb:83:in `each’
/usr/local/Library/Homebrew/cmd/install.rb:83:in `install’
/usr/local/Library/brew.rb:140:in `&lt;main&gt;'</div>
[/code]

しらべたらtmpディレクトリの権限が怪しいんじゃないのーっていう、外人が書いてたフォーラムの記事を参考に権限を変えてみました。

[code lang=”bash”]
$ cd ~/
$ ls -l
lrwxr-xr-x@  1 root  wheel    11  2 22 17:56 tmp -&gt; private/tmp
$ sudo chmod +t tmp/
$ cd tmp/
$ brew install caskroom/cask/brew-cask
==&gt; Installing brew-cask from caskroom/homebrew-cask
==&gt; Cloning <a href="https://github.com/caskroom/homebrew-cask.git">https://github.com/caskroom/homebrew-cask.git</a>
Updating /Library/Caches/Homebrew/brew-cask–git
==&gt; Checking out tag v0.53.3
&#x1f37a;  /usr/local/Cellar/brew-cask/0.53.3: 2421 files, 9.5M, built in 2 seconds

[/code]
どうやらうまくいったようです。

xquartzのインストール

[code lang=”bash”]
$ brew install Caskroom/cask/xquartz
==&gt; brew cask install Caskroom/cask/xquartz
==&gt; We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==&gt; We’ll set permissions properly so we won’t need sudo in the future
Password:
==&gt; Downloading <a href="https://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg">https://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg</a>
######################################################################## 100.0%
==&gt; Running installer for xquartz; your password may be necessary.
==&gt; Package installers may write to any location; options such as –appdir are ignored.

==&gt; installer: Package name is XQuartz 2.7.7
==&gt; installer: Installing at base path /
==&gt; installer: The install was successful.
&#x1f37a;  xquartz staged at ‘/opt/homebrew-cask/Caskroom/xquartz/2.7.7’ (64M)

[/code]

Rictyのインストール

[code lang=”bash”]
$ brew install ricty
※長いので省略

$ cp -f /usr/local/Cellar/ricty/3.2.4/share/fonts/Ricty*.ttf ~/Library/Fonts/
$ fc-cache -vf
/usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 156 fonts, 0 dirs
/Library/Fonts: caching, new cache contents: 422 fonts, 0 dirs
/Users/kazuma/Library/Fonts: caching, new cache contents: 4 fonts, 0 dirs
/Users/kazuma/.local/share/fonts: skipping, no such directory
/Users/kazuma/.fonts: skipping, no such directory
/usr/local/var/cache/fontconfig: cleaning cache directory
/Users/kazuma/.cache/fontconfig: not cleaning non-existent cache directory
/Users/kazuma/.fontconfig: not cleaning non-existent cache directory

fc-cache: succeeded

[/code]
あとはターミナルとかエディタとかでRictyを指定してあげると、カッコイイフォントに切り替わります。
おしまい。

カテゴリー: MacTech