備忘録。
contrib レポジトリの追加
$ sudo tlmgr repository add http://contrib.texlive.info/current tlcontrib
$ sudo tlmgr pinning add tlcontrib '*'
必要なパッケージのインストール
$ sudo tlmgr install japanese-otf-nonfree japanese-otf-uptex-nonfree ptex-fontmaps-macos cjk-gs-integrate-macos
cjk-gs-integrate
cjkgs-morisawa-extra.dat
がないという Warning がでるが、これはミスで気にしなくていいらしい。
$ sudo cjk-gs-integrate --link-texmf --cleanup --force
cjk-gs-integrate: reading font database ...
cjk-gs-integrate [WARNING]: Cannot find cjkgs-morisawa-extra.dat, skipping!
cjk-gs-integrate: searching for Ghostscript resource
cjk-gs-integrate: going to clean up /usr/local/share/ghostscript/9.26/Resource
cjk-gs-integrate: cleaning up all links, snippets and cidfmap.local ...
cjk-gs-integrate: removing cidfmap.local from cidfmap file ...
cjk-gs-integrate: removing snippets and cidfmap.aliases for font aliases ...
cjk-gs-integrate: removing cidfmap.aliases from cidfmap file ...
cjk-gs-integrate: finished
High Sierra 未満の場合も、ディレクトリを掘れば必要な dat ファイルが出てくるので、それを使って実行する。
$ sudo cjk-gs-integrate --link-texmf --force --fontdef-add /usr/local/texlive/2018/texmf-dist/fonts/misc/cjk-gs-integrate-macos/cjkgs-macos-highsierra.dat
cjk-gs-integrate: reading font database ...
cjk-gs-integrate [WARNING]: Cannot find cjkgs-morisawa-extra.dat, skipping!
cjk-gs-integrate: checking for files ...
cjk-gs-integrate: searching for Ghostscript resource
cjk-gs-integrate: output is going to /usr/local/share/ghostscript/9.26/Resource
cjk-gs-integrate: generating links and snippets for CID fonts ...
cjk-gs-integrate: generating links, snippets and cidfmap.local for non-CID fonts ...
cjk-gs-integrate: adding cidfmap.local to cidfmap file ...
cjk-gs-integrate: cidfmap.local already loaded in /usr/local/share/ghostscript/9.26/Resource/Init/cidfmap, no changes
cjk-gs-integrate: generating snippets and cidfmap.aliases for font aliases ...
cjk-gs-integrate: adding cidfmap.aliases to cidfmap file ...
cjk-gs-integrate: cidfmap.aliases already loaded in /usr/local/share/ghostscript/9.26/Resource/Init/cidfmap, no changes
cjk-gs-integrate: finished
mktexlsr
$ sudo mktexlsr
kpsewhich で処理系がヒラギノのファイルを見つけることができるかを確認できる。
$ kpsewhich HiraginoSerif.ttc
/usr/local/texlive/texmf-local/fonts/opentype/cjk-gs-integrate/HiraginoSerif.ttc
kanji-config-updmap-sys
status コマンドで使える map ファイルを一覧で見ることができる。
$ sudo kanji-config-updmap-sys status
CURRENT family for ja: morisawa-pr6n
Standby family : hiragino-highsierra
Standby family : hiragino-highsierra-pron
Standby family : ipa
Standby family : ipaex
Standby family : toppanbunkyu-highsierra
$ sudo kanji-config-updmap-sys --jis2004 hiragino-highsierra-pron