xpdf日本語表示

xpdfの日本語対応でちょっとはまったので書いておく。 基本的な設定は他に解説しているブログ等いくつかあるのでそちらを見てもらうとして、 今回は.xpdfrcの設定の書きかたが変わった話。 通常、フォントを指定せずにdvipdfmxなりで.pdfを作ると デフォルトで日本語フォントはryuminに設定される。 これはリュウミン | フォント製品 | 株式会社モリサワで売っているフォントで有料である。 ということで、普段はこれを.xpdfrc内でdisplayNamedCIDFontTTを使って displayNamedCIDFontTT Ryumin-Light-Identity-H /usr/share/font/TTF/ipam.ttf の様にIPAフォントに置き換えていた。 しかしながら、どうも最新のxpdfでは
Config Error: Unknown config file command 'displayNamedCIDFontTT'
と怒られる。 エラーの内容からして、どうもdisplayNamedCIDFont*系のコマンドがなくなったらしい。 調べてみると.xpdfrcの書きかたがxpdf v3.02以降で変更されていた。 READMEの該当箇所
Upgrading from Xpdf 3.02 (and earlier)
--------------------------------------

The font configuration system has been changed.  Previous versions
used mostly separate commands to configure fonts for display and for
PostScript output.  As of 3.03, configuration options that make sense
for both display and PS output have been unified.

The following xpdfrc commands have been removed:
* displayFontT1, displayFontTT: replaced with fontFile
* displayNamedCIDFontT1, displayNamedCIDFontTT: replaced with fontFile
* displayCIDFontT1, displayCIDFontTT: replaced with fontFileCC
* psFont: replaced with psResidentFont
* psNamedFont16: replaced with psResidentFont16
* psFont16: replaced with psResidentFontCC

See the xpdfrc(5) man page for more information on the new commands.

Pdftops will now embed external 16-bit fonts (configured with the
fontFileCC command) when the PDF file refers to a non-embedded font.
It does not do any subsetting (yet), so the resulting PS files will be
large.
ということでdisplayNamedCIDFontTT -> fontFileに置き換えたら無事日本語フォントが適用されましたとさ。