6.3.2 userfont.properties への追加手順
埋め込みフォントを利用するためには、userfont.properties への追加作業が必要です。
userfont.propertiesへの追加
フォントプロパティの生成
埋め込みをするフォントのフォントプロパティを生成し userfont.properties へ追記します。
次の<フォント名>部分には、「bsxml.dtd」で指定したフォント名を指定してください。
a) embedded.font.<フォント名>.file=(フォントファイル名)(※1)
b) embedded.font.<フォント名>.name=(PostScript 名)(※2)
c) embedded.font.<フォント名>.type=(※3)
d) embedded.font.<フォント名>.encoding=(※4)
e) embedded.font.<フォント名>.cmap=3,10(※5)
f) embedded.font.<フォント名>.ivscmap=0,5(※6)
- ※1フォントファイルがインストールされているディレクトリを含めた指定を行います。
- ※2フォントファイルの拡張子が ttc の場合のみ設定が必要です。
- ※3次の表に従って指定を行います。
フォントの種類 設定値 TrueTypeフォント (.ttf/.ttc) type0identity OpenTypeフォント (.otf) type1identity - ※4次の表に従って指定を行います。
方向 設定値 横書き PDFEmbeddedIdentity_H 縦書き PDFEmbeddedIdentity_V - ※5サロゲートペアを表示する場合に設定が必要です。
- ※6異体字セレクタを表示する場合に設定が必要です。
追加設定サンプル
例1:TrueTypeフォント(.ttf/.ttc)
「MS ゴシック」を横書き埋め込みフォントとして設定するサンプルです。
userfont.properties に、「Embedded_MSGothic」の詳細を指定します。
embedded.font.Embedded_MSGothic.file=C:/Windows/Fonts/msgothic.ttc
embedded.font.Embedded_MSGothic.name=MS-Gothic
embedded.font.Embedded_MSGothic.type=type0identity
embedded.font.Embedded_MSGothic.encoding=PDFEmbeddedIdentity_H
embedded.font.Embedded_MSGothic.cmap=3,10
embedded.font.Embedded_MSGothic.ivscmap=0,5
例2:OpenTypeフォント(.otf)
「A-OTF リュウミン」を縦書き埋め込みフォントとして設定するサンプルです。
userfont.properties に、「Embedded_RyuminRegular_V」の詳細を指定します。
embedded.font.Embedded_RyuminRegular_V.file=C:/Windows/Fonts/RyuminRegular.otf
embedded.font.Embedded_RyuminRegular_V.type=type1identity
embedded.font.Embedded_RyuminRegular_V.encoding=PDFEmbeddedIdentity_V
embedded.font.Embedded_RyuminRegular_V.cmap=3,10
embedded.font.Embedded_RyuminRegular_V.ivscmap=0,5
フォントプロパティ生成ツール
上記のフォントプロパティを手動で作成せず「6.8 フォントプロパティ生成ツール」にて自動生成することができます。生成した結果は手動でuserfont.properties へ追加してください。