Translation:10 5/ja
From IDMLWiki
5節 / フォント
Contents |
10.5 フォント
ドキュメントで使用されるフォントおよび合成フォントは、IDMLパッケージのResourcesフォルダ内のFonts.xmlファイルで定義されます。空のInDesignドキュメントであっても、デフォルトのフォントと合成フォントの参照が必要です。
Note:InDesignドキュメントでは、フォントの埋め込みがサポートされていないので、IDMLでフォントは埋め込まれません。ドキュメント内で使用されているフォントは、<Fonts>エレメントで定義されているフォントの1つへの、単純な参照で表されます。IDMLパッケージをInDesignに配置する際、IDMLパッケージ内で参照されているフォントがシステムにない場合、フォントがシステムにないことを示す警告メッセージが表示されます。
Fonts.xmlには、2つの主なエレメントがあります。<FontFamily>と<CompositeFont>です。
10.5.1 フォントとフォントファミリー
フォントファミリーは似たフォントのグループです。例えば、「Arial Regular」と「Arial Bold」、「Arial Italic」というフォントは、すべて同じフォントファミリーに属します。<FontFamily>エレメントは<Font>エレメントをグループ化したもので、各<Font>エレメントが特定のフォントを定義します。
<FontFamily>エレメントと<Font>エレメントは、共にID属性を持っています。この属性はIDMLパッケージ内を通して参照されます。
スキーマの例52 FontFamily
FontFamily_Object = element FontFamily{
attribute Self { xsd:string },
attribute Name { xsd:string }?,
(Font_Object*)}
スキーマの例53 Font
Font_Object = element Font {
attribute Self { xsd:string },
attribute FontFamily{ xsd:string }?,
attribute Name { xsd:string }?,
attribute PostScriptName{ xsd:string }?,
attribute Status { FontStatus_EnumValue }?,
attribute FontStyleName{ xsd:string }?,
attribute FontType{ FontTypes_EnumValue }?,
attribute WritingScript{ xsd:int }?,
attribute FullName{ xsd:string }?,
attribute FullNameNative{ xsd:string }?,
attribute FontStyleNameNative{ xsd:string }?,
attribute PlatformName{ xsd:string }?,
attribute Version { xsd:string }?
}
下記は、<Font>エレメントが「Myriad Pro Bold」フォントを定義している例です。
Note:「Myriad Pro」フォントファミリーに属する他のフォントは省略しています。
IDMLの例50 Font
<FontFamily Self="di77" Name="Myriad Pro"><Font Self="di77FontnMyriad Pro Bold" FontFamily=" Myriad Pro" Name="Myriad Pro Bold" PostScriptName="$ ID/MyriadPro- Bold" Status="Installed" FontStyleName=" Bold" FontType=" OpenTypeCFF" WritingScript=" 0" FullName=" Myriad Pro Bold" FullNameNative=" Myriad Pro Bold" FontStyleNameNative=" Bold" PlatformName="$ ID/" Version="Version 2.007;PS 002.000;Core 1.0.38;makeotf.lib1.7.9032"/></FontFamily>
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FontFamily | string | ○ | このフォントを含むフォントファミリーへの参照。<FontFamily>エレメントのユニークなID(Self属性) |
| FontStyleName | string | ○ | フォントスタイル名 |
| FontStyleNameNative | string | ○ | ネイティブでのフォントスタイル名 |
| FontType | FontTypes_EnumValue | ○ | フォントタイプ。Type1、TrueType、CID、ATC、Bitmap、OCF、OpenTypeCFF、OpenTypeCID、OpenTypeTTまたはUnknown |
| FullName | string | ○ | フルフォント名 |
| FullNameNative | string | ○ | ネイティブでのフルフォント名 |
| Name | string | ○ | フォント名 |
| PlatformName | string | ○ | プラットフォームでのフォント名 |
| PostScriptName | string | ○ | PostScriptでのフォント名 |
| Status | FontStatus_EnumValue | ○ | フォントのステータス。Installed、NotAvailable、Fauxed、SubstitutedまたはUnknown |
| Version | string | ○ | フォントのバージョン |
| WritingScript | int | ○ | ライティングスクリプト。0(欧文)、1(日本語)または2(繁体字中国語) |
フォントの参照
IDMLパッケージ内のエレメントは、<Font>エレメントのSelf属性またはName属性のどちらかを使って、フォントを参照することができます。パッケージ内でフォントを参照するエレメントは、<CharacterStyle>、<CharacterStyleRange>、<ParagraphStyle>や<ParagraphStyleRange>などがあります。
たくさんのエレメントが、フォントファミリーを指定する<AppliedFont>プロパティと、フォントスタイルを指定する<FontStyle>属性の組み合わせを使っています。
下記は<CharacterStyleRange>エレメントが「Arial Italic」フォントを参照している例です。 参照は名前で行われています。
IDMLの例51 フォントの参照
<CharacterStyleRange AppliedCharacterStyle=" CharacterStyle\ k[No character style]" FontStyle=" Italic"><Properties><AppliedFont type="string">Arial</AppliedFont>
</Properties><Content>This is some text formatted using Arial Italic.</Content>
</CharacterStyleRange>
10.5.2 合成フォント
合成フォントは、InDesign日本語版での機能ですが、他言語版のInDesignドキュメントにも存在しています。合成フォントを使用していなくても、合成フォントについて認識しておく必要があります。IDMLドキュメント内に存在している可能性があります。
合成フォントは、複数の、別々のフォントでできています。例えばデフォルトの合成フォント[合成フォントなし]は、次の<CompositeFontEntry>エレメントで構成されています。
- 漢字
- かな
- 全角約物
- 全角記号
- 半角欧文
- 半角数字
それぞれの<CompositeFontEntry>エレメントには、使用するフォントを定義する<AppliedFont>プロパティがあります。
Note:InDesignおよびIDMLにおける合成フォントは、PDFやPostScriptでの合成フォントと同じではありません。PDFやPostScriptの合成フォントは、1つ以上のフォントのグリフで作られた、埋め込まれたフォントオブジェクトです。InDesignの合成フォントは、日本語フォントに基づいており、埋め込みはできません。また、複数のフォントのグリフから作られています。InDesignの合成フォントはファイル形式ではなく、ドキュメント内に保存されたものでもありません。InDesignのUIで一時的に作られた文字セットです。
スキーマの例54 CompositeFont
CompositeFont_Object = element CompositeFont{
attribute Self { xsd:string },
attribute Name { xsd:string },
element Properties {element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(CompositeFontEntry_Object*)}
スキーマの例55 CompositeFontEntry
CompositeFontEntry_Object = element CompositeFontEntry{
attribute Self { xsd:string },
attribute Name { xsd:string }?,
attribute FontStyle{ xsd:string }?,
attribute RelativeSize{ xsd:double }?,
attribute HorizontalScale{ xsd:double }?,
attribute VerticalScale{ xsd:double }?,
attribute CustomCharacters{ xsd:string }?,
attribute Locked { xsd:boolean }?,
attribute ScaleOption{ xsd:boolean }?,
attribute BaselineShift{ xsd:double }?,
element Properties {element AppliedFont{(object_type, xsd:string ) |
(string_type, xsd:string )
}?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?}
