ghostscript 10.x でHaranoAJI otfフォントを使えない

Re: ghostscript 10.x でHaranoAJI otfフォントを使えない

- はやて (h20y6m) の投稿
返信数: 2
とりあえず cjk-gs-integrate したときに alias が IPA になる方法です。

$TEXMFDIST/fonts/misc/cjk-gs-integrate/cjkgs-ipa.dat を
$TEXMFLOCAL/fonts/misc/cjk-gs-integrate/cjkgs-ipa.dat にコピーします。
コピーしたら mktexlsr を実行しておきます。

コピーした cjkgs-ipa.dat に以下のような記述があります。

Name: IPAGothic
...
Provides(130): GothicBBB-Medium
Provides(130): GothicBBBPro-Medium
...

Name: IPAMincho
...
Provides(130): Ryumin-Light
Provides(130): RyuminPro-Light
...

この Provides(130) の 130 という数字を小さい値(HaranoAji が 70 なので 69 以下にする)に書き換えます。

cjk-gs-integrate を実行すると cidfmap.alias が

/GothicBBB-Medium /IPAGothic ;

/Ryumin-Light /IPAMincho ;

となるはずです。
はやて (h20y6m) への返信

Re: ghostscript 10.x でHaranoAJI otfフォントを使えない

- 和田 勇 の投稿

はやてさんの変更案を検証してみました。

openSUSE Tumbleweed (6.5.4-1-default) で インストールできる ghostscript は 9.56.1 なので 10.02.0 のソースからコンパイル・ビルドしてみました。 configure

  • configure オプション

    ./configure --disable-compile-inits --without-versioned-path --prefix=/tmp/ghostscript
    
    • ただし 画像 表示はできてはいないのですが、表示されるメッセージから、一応フォントはアクセスできているようです。
  • 実行コマンド

    export PATH=/tmp/ghostscript/bin:$PATH
    
    gs examples/cjk/article9.ps
    
  • 実行後に表示されるメッセージ

    GPL Ghostscript 10.02.0 (2023-09-13)
    Copyright (C) 2023 Artifex Software, Inc.  All rights reserved.
    This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
    see the file COPYING for details.
    Loading GothicBBB-Medium-V font from /tmp/ghostscript/share/ghostscript/Resource/Font/GothicBBB-Medium-V... Loading a TT font from /tmp/ghostscript/share/ghostscript/Resource/CIDFSubst/ipag.ttf to emulate a CID font IPAGothic ... Done.
    5157824 3738611 2772320 1478817 1 done.
    Loading Ryumin-Light-V font from /tmp/ghostscript/share/ghostscript/Resource/Font/Ryumin-Light-V... Loading a TT font from /tmp/ghostscript/share/ghostscript/Resource/CIDFSubst/ipam.ttf to emulate a CID font IPAMincho ... Done.
    6697436 5288726 2812720 1505509 1 done.
    %%BoundingBox: 49 49 551 751
    %%HiResBoundingBox: 49.499998 49.499998 550.500030 750.499993
    
  • その他

    • openSUSE Tumbleweed (6.5.4-1-default) / ghostscript 9.56.1 / +はやてさんの修正案

      • GothicBBB-Medium は最終的に ipag.ttf にアクセスできるものの Ryumin-Light は ipam.ttf があるものの font file CIDFont となりエラーになってしまいます。
    • debian 12 (6.1.0-12-amd64) / ghostscript 10.00.0

      • 質問者さんが利用していた cjk-gs-integrate を利用せずとも 最終的に ipag.ttf ipam.ttf にアクセスできます。

        GPL Ghostscript 10.0.0 (2022-09-21)
        Copyright (C) 2022 Artifex Software, Inc.  All rights reserved.
        This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
        see the file COPYING for details.
        Querying operating system for font files...
        Loading a TT font from /usr/share/fonts/truetype/fonts-japanese-gothic.ttf to emulate a CID font Japanese-Gothic-Regular ... Done.
        Loading a TT font from /usr/share/fonts/truetype/fonts-japanese-mincho.ttf to emulate a CID font Japanese-Mincho-Regular ... Done.
        
      • 上記の fonts-japanese-gothic.ttf fonts-japanese-mincho.ttf のリンク先(見易く編集しました)

        /usr/share/fonts/truetype/fonts-japanese-gothic.ttf
            → /etc/alternatives/fonts-japanese-gothic.ttf
            → /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf
        
        /usr/share/fonts/truetype/fonts-japanese-mincho.ttf 
            → /etc/alternatives/fonts-japanese-mincho.ttf
            → /usr/share/fonts/opentype/ipafont-mincho/ipam.ttf
        
      • 句読点の表示位置も妥当でした

      • OS を変更できるなら openSUSE から debian 12 が簡単です
      • ubuntu 23.10 がリリースされたら確認してみたいとおもいます
和田 勇 への返信

Re: ghostscript 10.x でHaranoAJI otfフォントを使えない

- 野宮 賢 の投稿
はやてさん、和田さん、有難うございます.

ghostscript 10.02.0 に関しては、和田さんと同じ結果です.
ghostscript 9.56.1 に関しては、どのように解決したのかよく思い出せませんが、苦労したのは事実です.

ディストロでこれ程の違いがあるとは、思ってもいませんでした.

> /etc/alternatives/fonts-japanese-gothic.ttf

こういう使い方だと、cjk-gs-integrate は必要ではないですね.