Evinceで明朝のはずの文字がゴシックで表示される
PDFファイルを作ったときに明朝を想定していたところが、部室の端末のEvinceで開くとゴシックで表示されていた。 Acrobat Readerでは正しく表示される。 これはPDFファイルにフォントが埋め込まれておらず、かつRyuminフォントの割り当てが設定されていないためにデフォルトのフォントであるゴシックで表示してしまっているためである。
次のファイルを/usr/local/etc/fonts/conf.d/99-pdf.confに配置した。 フォントが決め打ちになってしまっているところが残念。
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>Ryumin</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>IPAPMincho</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>GothicBBB</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>IPAPGothic</string> </edit> </match> </fontconfig>