evince での日本語表示

以前 twitter で henrich さんから教えてもらったこと.

Debian lenney を install して, とくに設定をせずに evince でPDF を表示すると明朝体もゴシック体で表示される.

これはfontconfig において Ryumin と Gothic-BBB が設定されていない(優先的に VL Gothic となるように設定されている)から.

そんな訳で, 例えば, 以下の様に

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- section:Ryumin for IPA Mincho:start -->
<match target="pattern">
  <test qual="any" name="family">
    <string>Ryumin</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
    <string>IPA Mincho</string>
  </edit>
</match>
<!-- section:Ryumin for IPA Mincho:end -->
<!-- section:Ryumin for IPA Gothic:start -->
<match target="pattern">
  <test qual="any" name="family">
    <string>Gothic-BBB</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
    <string>IPA P Gothic</string>
  </edit>
</match>
<!-- section:Ryumin for IPA Gothic:end -->
</fontconfig>

設定前はこんな感じ.

設定後.望んだ通り, 明朝体とゴシック体が出ましたよ.