Translation:10 5/ja

From IDMLWiki

Jump to: navigation, search

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
  1. FontFamily_Object = element FontFamily{ 
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string }?,
  4. (
  5.   Font_Object*
  6. )
  7. }
スキーマの例53 Font
  1. Font_Object = element Font {
  2.   attribute Self { xsd:string },
  3.   attribute FontFamily{  xsd:string }?,
  4.   attribute Name { xsd:string }?,
  5.   attribute PostScriptName{  xsd:string }?,
  6.   attribute Status { FontStatus_EnumValue }?,
  7.   attribute FontStyleName{  xsd:string }?,
  8.   attribute FontType{  FontTypes_EnumValue }?,
  9.   attribute WritingScript{  xsd:int }?,
  10.   attribute FullName{  xsd:string }?,
  11.   attribute FullNameNative{  xsd:string }?,
  12.   attribute FontStyleNameNative{  xsd:string }?,
  13.   attribute PlatformName{  xsd:string }?,
  14.   attribute Version { xsd:string }?
  15. }

下記は、<Font>エレメントが「Myriad Pro Bold」フォントを定義している例です。

Note:「Myriad Pro」フォントファミリーに属する他のフォントは省略しています。

IDMLの例50 Font
  1. <FontFamily Self="di77" Name="Myriad Pro">
  2.   <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"/>
  3. </FontFamily>
表61 属性としてのFontプロパティ
名前 必須 説明
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 フォントの参照
  1. <CharacterStyleRange AppliedCharacterStyle=" CharacterStyle\ k[No character style]" FontStyle=" Italic">
  2.   <Properties>
  3.     <AppliedFont type="string">Arial</AppliedFont>
  4.   </Properties>
  5.   <Content>This is some text formatted using Arial Italic.</Content>
  6. </CharacterStyleRange>

10.5.2 合成フォント

合成フォントは、InDesign日本語版での機能ですが、他言語版のInDesignドキュメントにも存在しています。合成フォントを使用していなくても、合成フォントについて認識しておく必要があります。IDMLドキュメント内に存在している可能性があります。

合成フォントは、複数の、別々のフォントでできています。例えばデフォルトの合成フォント[合成フォントなし]は、次の<CompositeFontEntry>エレメントで構成されています。

  • 漢字
  • かな
  • 全角約物
  • 全角記号
  • 半角欧文
  • 半角数字

それぞれの<CompositeFontEntry>エレメントには、使用するフォントを定義する<AppliedFont>プロパティがあります。

Note:InDesignおよびIDMLにおける合成フォントは、PDFやPostScriptでの合成フォントと同じではありません。PDFやPostScriptの合成フォントは、1つ以上のフォントのグリフで作られた、埋め込まれたフォントオブジェクトです。InDesignの合成フォントは、日本語フォントに基づいており、埋め込みはできません。また、複数のフォントのグリフから作られています。InDesignの合成フォントはファイル形式ではなく、ドキュメント内に保存されたものでもありません。InDesignのUIで一時的に作られた文字セットです。

スキーマの例54 CompositeFont
  1. CompositeFont_Object = element CompositeFont{ 
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string },
  4.   element Properties {
  5.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  6.     }?
  7.   }
  8.   ?
  9.   ,
  10. (
  11.   CompositeFontEntry_Object*
  12. )
  13. }
スキーマの例55 CompositeFontEntry
  1. CompositeFontEntry_Object = element CompositeFontEntry{ 
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string }?,
  4.   attribute FontStyle{  xsd:string }?,
  5.   attribute RelativeSize{  xsd:double }?,
  6.   attribute HorizontalScale{  xsd:double }?,
  7.   attribute VerticalScale{  xsd:double }?,
  8.   attribute CustomCharacters{  xsd:string }?,
  9.   attribute Locked { xsd:boolean }?,
  10.   attribute ScaleOption{  xsd:boolean }?,
  11.   attribute BaselineShift{  xsd:double }?,
  12.   element Properties {
  13.     element AppliedFont{ 
  14.       (object_type, xsd:string ) |
  15.       (string_type, xsd:string )
  16.     }?&
  17.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  18.     }?
  19.   }
  20.   ?
  21. }
Personal tools