Translation5:Character Styles

From IDMLWiki

Jump to: navigation, search

Contents

10.8.4 文字スタイル

文字スタイルは、1回の操作でテキストに適用できる、文字書式の属性の集まりです。段落スタイルとは異なり、文字スタイルには選択したテキストのすべての書式設定属性が含まれるわけではなく、通常、適用するテキストで周囲のテキストと異なる書式だけを設定します。

IDMLでの文字スタイルは、段落スタイルと同じ方法で記述されます。各ドキュメントには<RootCharacterStyleGroup>エレメントがあり、その中にドキュメントで使用されるすべての<CharacterStyle>エレメントと<CharacterStyleGroup>エレメントが含まれます。<RootCharacterStyleGroup>エレメントと<CharacterStyleGroup>エレメントは同じ構造です。

スキーマの例147 CharacterStyleGroup
  1. CharacterStyleGroup_Object = element CharacterStyleGroup{ 
  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.   CharacterStyle_Object*&
  12.   CharacterStyleGroup_Object*
  13. )
  14. }
IDMLの例89 CharacterStyleGroup
  1. <RootCharacterStyleGroup Self="u6a">
  2.   <CharacterStyle Self="CharacterStyle\[ No character style]" Imported="false" Name="$ID/[No character style]"/>
  3.   <CharacterStyle Self="CharacterStyle\ Emphasis" Imported="false" Name="Emphasis" FontStyle=" Italic">
  4.     <Properties>
  5.       <BasedOn type="string">$ID/[No character style]</BasedOn>
  6.     </Properties>
  7.   </CharacterStyle>
  8.   <CharacterStyle Self="CharacterStyle\ cInlineCode" Imported="false" Name="InlineCode" FontStyle=" Regular">
  9.     <Properties>
  10.       <BasedOn type="string">$ID/[No character style]</BasedOn>
  11.       <AppliedFont type="string">Droid Sans Mono</AppliedFont>
  12.     </Properties>
  13.   </CharacterStyle>
  14.   <CharacterStyleGroup Self="CharacterStyleGroup\ HyperlinkStyles" Name="$ID/HyperlinkStyles">
  15.     <CharacterStyle Self="CharacterStyle\ HyperlinkStyles% 3aEmail" Imported="false" Name="HyperlinkStyles: Email">
  16.       <Properties>
  17.         <BasedOn type="object">CharacterStyle\ HyperlinkStyles\ Hyperlink</BasedOn>
  18.       </Properties>
  19.     </CharacterStyle>
  20.     <CharacterStyle Self="CharacterStyle\ HyperlinkStyles\ URL" Imported="false" Name="HyperlinkStyles: URL">
  21.       <Properties>
  22.         <BasedOn type="object">CharacterStyle\ HyperlinkStyles\ Hyperlink</BasedOn>
  23.       </Properties>
  24.     </CharacterStyle>
  25.     <CharacterStyle Self="CharacterStyle\ HyperlinkStyles\ Hyperlink" Imported="false" Name="HyperlinkStyles: Hyperlink">
  26.       <Properties>
  27.         <BasedOn type="string">$ID/[No character style]</BasedOn>
  28.       </Properties>
  29.     </CharacterStyle>
  30.   </CharacterStyleGroup>
  31. </RootCharacterStyleGroup>
図58 文字スタイル

Image:Fig056.png

スキーマの例148 CharacterStyle
  1. CharacterStyle_Object = element CharacterStyle{ 
  2.   attribute Self { xsd:string },
  3.   attribute Imported { xsd:boolean }?,
  4.   attribute FontStyle{  xsd:string }?,
  5.   attribute PointSize{  xsd:double }?,
  6.   attribute KerningMethod{  xsd:string }?,
  7.   attribute Tracking { xsd:double }?,
  8.   attribute Capitalization { Capitalization_EnumValue }?,
  9.   attribute Position { Position_EnumValue }?,
  10.   attribute Underline { xsd:boolean }?,
  11.   attribute StrikeThru{  xsd:boolean }?,
  12.   attribute Ligatures { xsd:boolean }?,
  13.   attribute NoBreak{  xsd:boolean }?,
  14.   attribute HorizontalScale{  xsd:double }?,
  15.   attribute VerticalScale{  xsd:double }?,
  16.   attribute BaselineShift{  xsd:double }?,
  17.   attribute Skew { xsd:double }?,
  18.   attribute FillTint{  xsd:double }?,
  19.   attribute StrokeTint{  xsd:double }?,
  20.   attribute StrokeWeight{  xsd:double }?,
  21.   attribute OverprintStroke{  xsd:boolean }?,
  22.   attribute OverprintFill{  xsd:boolean }?,
  23.   attribute OTFFigureStyle{  OTFFigureStyle_EnumValue }?,
  24.   attribute OTFOrdinal { xsd:boolean }?,
  25.   attribute OTFFraction { xsd:boolean }?,
  26.   attribute OTFDiscretionaryLigature{  xsd:boolean }?,
  27.   attribute OTFTitling { xsd:boolean }?,
  28.   attribute OTFContextualAlternate{  xsd:boolean }?,
  29.   attribute OTFSwash { xsd:boolean }?,
  30.   attribute UnderlineTint{  xsd:double }?,
  31.   attribute UnderlineGapTint{  xsd:double }?,
  32.   attribute UnderlineOverprint{  xsd:boolean }?,
  33.   attribute UnderlineGapOverprint{  xsd:boolean }?,
  34.   attribute UnderlineOffset{  xsd:double }?,
  35.   attribute UnderlineWeight{  xsd:double }?,
  36.   attribute StrikeThroughTint{  xsd:double }?,
  37.   attribute StrikeThroughGapTint{  xsd:double }?,
  38.   attribute StrikeThroughOverprint{  xsd:boolean }?,
  39.   attribute StrikeThroughGapOverprint{  xsd:boolean }?,
  40.   attribute StrikeThroughOffset{  xsd:double }?,
  41.   attribute StrikeThroughWeight{  xsd:double }?,
  42.   attribute FillColor{  xsd:string }?,
  43.   attribute StrokeColor{  xsd:string }?,
  44.   attribute AppliedLanguage{  xsd:string }?,
  45.   attribute KeyboardShortcut{  list { xsd:short ,xsd:short } }?,
  46.   attribute OTFSlashedZero{  xsd:boolean }?,
  47.   attribute OTFHistorical { xsd:boolean }?,
  48.   attribute OTFStylisticSets{  xsd:int }?,
  49.   attribute GradientFillLength{  xsd:double }?,
  50.   attribute GradientFillAngle{  xsd:double }?,
  51.   attribute GradientStrokeLength{  xsd:double }?,
  52.   attribute GradientStrokeAngle{  xsd:double }?,
  53.   attribute GradientFillStart{  UnitPointType_TypeDef }?,
  54.   attribute GradientStrokeStart{  UnitPointType_TypeDef }?,
  55.   attribute OTFMark { xsd:boolean }?,
  56.   attribute OTFLocale { xsd:boolean }?,
  57.   attribute PositionalForm{  PositionalForms_EnumValue }?,
  58.   attribute Name { xsd:string },
  59.   attribute MiterLimit{  xsd:double {minInclusive="1" maxInclusive="500"} }?,
  60.   attribute StrokeAlignment{  TextStrokeAlign_EnumValue }?,
  61.   attribute EndJoin{  OutlineJoin_EnumValue }?,
  62.   attribute OTFOverlapSwash{  xsd:boolean }?,
  63.   attribute OTFStylisticAlternate{  xsd:boolean }?,
  64.   attribute OTFJustificationAlternate{  xsd:boolean }?,
  65.   attribute OTFStretchedAlternate{  xsd:boolean }?,
  66.   attribute CharacterDirection{  CharacterDirection_EnumValue }?,
  67.   attribute KeyboardDirection{  CharacterDirection_EnumValue }?,
  68.   attribute DigitsType{  DigitsType_EnumValue }?,
  69.   attribute Kashidas { Kashidas_EnumValue }?,
  70.   attribute DiacriticPosition{  DiacriticPosition_EnumValue }?,
  71.   attribute XOffsetDiacritic{  xsd:double }?,
  72.   attribute YOffsetDiacritic{  xsd:double }?,
  73.   attribute GotoNextX{  GotoNextX_EnumValue }?,
  74.   attribute PageNumberType{  PageNumberType_EnumValue }?,
  75.   attribute CharacterAlignment{  CharacterAlignment_EnumValue }?,
  76.   attribute Tsume { xsd:double }?,
  77.   attribute LeadingAki{  xsd:double }?,
  78.   attribute TrailingAki{  xsd:double }?,
  79.   attribute CharacterRotation{  xsd:double }?,
  80.   attribute Jidori { xsd:short }?,
  81.   attribute ShataiMagnification{  xsd:double }?,
  82.   attribute ShataiDegreeAngle{  xsd:double }?,
  83.   attribute ShataiAdjustRotation{  xsd:boolean }?,
  84.   attribute ShataiAdjustTsume{  xsd:boolean }?,
  85.   attribute Tatechuyoko { xsd:boolean }?,
  86.   attribute TatechuyokoXOffset{  xsd:double }?,
  87.   attribute TatechuyokoYOffset{  xsd:double }?,
  88.   attribute KentenTint{  xsd:double }?,
  89.   attribute KentenStrokeTint{  xsd:double }?,
  90.   attribute KentenWeight{  xsd:double }?,
  91.   attribute KentenOverprintFill{  AdornmentOverprint_EnumValue }?,
  92.   attribute KentenOverprintStroke{  AdornmentOverprint_EnumValue }?,
  93.   attribute KentenKind{  KentenCharacter_EnumValue }?,
  94.   attribute KentenPlacement{  xsd:double }?,
  95.   attribute KentenAlignment{  KentenAlignment_EnumValue }?,
  96.   attribute KentenPosition{  RubyKentenPosition_EnumValue }?,
  97.   attribute KentenFontSize{  xsd:double }?,
  98.   attribute KentenXScale{  xsd:double }?,
  99.   attribute KentenYScale{  xsd:double }?,
  100.   attribute KentenCustomCharacter{  xsd:string }?,
  101.   attribute KentenCharacterSet{  KentenCharacterSet_EnumValue }?,
  102.   attribute RubyTint{  xsd:double }?,
  103.   attribute RubyWeight{  xsd:double }?,
  104.   attribute RubyOverprintFill{  AdornmentOverprint_EnumValue }?,
  105.   attribute RubyOverprintStroke{  AdornmentOverprint_EnumValue }?,
  106.   attribute RubyStrokeTint{  xsd:double }?,
  107.   attribute RubyFontSize{  xsd:double }?,
  108.   attribute RubyOpenTypePro{  xsd:boolean }?,
  109.   attribute RubyXScale{  xsd:double }?,
  110.   attribute RubyYScale{  xsd:double }?,
  111.   attribute RubyType{  RubyTypes_EnumValue }?,
  112.   attribute RubyAlignment{  RubyAlignments_EnumValue }?,
  113.   attribute RubyPosition{  RubyKentenPosition_EnumValue }?,
  114.   attribute RubyXOffset{  xsd:double }?,
  115.   attribute RubyYOffset{  xsd:double }?,
  116.   attribute RubyParentSpacing{  RubyParentSpacing_EnumValue }?,
  117.   attribute RubyAutoAlign{  xsd:boolean }?,
  118.   attribute RubyOverhang{  xsd:boolean }?,
  119.   attribute RubyAutoScaling{  xsd:boolean }?,
  120.   attribute RubyParentScalingPercent{  xsd:double }?,
  121.   attribute RubyParentOverhangAmount{  RubyOverhang_EnumValue }?,
  122.   attribute Warichu { xsd:boolean }?,
  123.   attribute WarichuSize{  xsd:double }?,
  124.   attribute WarichuLines{  xsd:short }?,
  125.   attribute WarichuLineSpacing{  xsd:double }?,
  126.   attribute WarichuAlignment{  WarichuAlignment_EnumValue }?,
  127.   attribute WarichuCharsAfterBreak{  xsd:short }?,
  128.   attribute WarichuCharsBeforeBreak{  xsd:short }?,
  129.   attribute OTFProportionalMetrics{  xsd:boolean }?,
  130.   attribute OTFHVKana { xsd:boolean }?,
  131.   attribute OTFRomanItalics{  xsd:boolean }?,
  132.   attribute ScaleAffectsLineHeight{  xsd:boolean }?,
  133.   attribute CjkGridTracking{  xsd:boolean }?,
  134.   attribute GlyphForm{  AlternateGlyphForms_EnumValue }?,
  135.   attribute RubyAutoTcyDigits{  xsd:short }?,
  136.   attribute RubyAutoTcyIncludeRoman{  xsd:boolean }?,
  137.   attribute RubyAutoTcyAutoScale{  xsd:boolean }?,
  138.   element Properties {
  139.     element BasedOn{ 
  140.       (object_type, xsd:string ) |
  141.       (string_type, xsd:string )
  142.     }?&
  143.     element AppliedFont{ 
  144.       (object_type, xsd:string ) |
  145.       (string_type, xsd:string )
  146.     }?&
  147.     element Leading {
  148.       (unit_type, xsd:double ) |
  149.       (enum_type, Leading_EnumValue )
  150.     }?&
  151.     element UnderlineColor{ 
  152.       (object_type, xsd:string ) |
  153.       (string_type, xsd:string )
  154.     }?&
  155.     element UnderlineGapColor{ 
  156.       (object_type, xsd:string ) |
  157.       (string_type, xsd:string )
  158.     }?&
  159.     element UnderlineType{ 
  160.       (object_type, xsd:string ) |
  161.       (string_type, xsd:string )
  162.     }?&
  163.     element StrikeThroughColor{ 
  164.       (object_type, xsd:string ) |
  165.       (string_type, xsd:string )
  166.     }?&
  167.     element StrikeThroughGapColor{ 
  168.       (object_type, xsd:string ) |
  169.       (string_type, xsd:string )
  170.     }?&
  171.     element StrikeThroughType{ 
  172.       (object_type, xsd:string ) |
  173.       (string_type, xsd:string )
  174.     }?&
  175.     element PreviewColor{ 
  176.       (InDesignUIColorType_TypeDef ) |
  177.       (enum_type, NothingEnum_EnumValue )
  178.     }?&
  179.     element KentenFillColor{ 
  180.       (object_type, xsd:string ) |
  181.       (string_type, xsd:string )
  182.     }?&
  183.     element KentenStrokeColor{ 
  184.       (object_type, xsd:string ) |
  185.       (string_type, xsd:string )
  186.     }?&
  187.     element KentenFont{ 
  188.       (object_type, xsd:string ) |
  189.       (string_type, xsd:string )
  190.     }?&
  191.     element KentenFontStyle{ 
  192.       (string_type, xsd:string ) |
  193.       (enum_type, NothingEnum_EnumValue )
  194.     }?&
  195.     element RubyFill{ 
  196.       (object_type, xsd:string ) |
  197.       (string_type, xsd:string )
  198.     }?&
  199.     element RubyStroke{ 
  200.       (object_type, xsd:string ) |
  201.       (string_type, xsd:string )
  202.     }?&
  203.     element RubyFont{ 
  204.       (object_type, xsd:string ) |
  205.       (string_type, xsd:string )
  206.     }?&
  207.     element RubyFontStyle{ 
  208.       (string_type, xsd:string ) |
  209.       (enum_type, NothingEnum_EnumValue )
  210.     }?&
  211.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  212.     }?
  213.   }
  214.   ?
  215. }

<CharacterStyle>エレメントのほとんどの属性とエレメントは、他のテキスト関連エレメントと共有されています。「10.4.6 共通のTextプロパティ」を参照してください。下の表は、<CharacterStyle>エレメントだけが持つ属性とエレメントです。

表168 属性としてのCharacterStyleプロパティ
名前 必須 説明
Imported boolean trueのとき、文字スタイルは他のファイルから読み込まれた
KeyboardShortcut string キーボードショートカット
Name string 文字スタイル名
表169 エレメントとしてのCharacterStyleプロパティ
名前 必須 説明
BasedOn string 基準となる文字スタイル。ユニークなID(<CharacterStyle>エレメントのSelf属性値)か、デフォルトの[なし]への参照($ID/[No character style])