FlowDocument.Typography プロパティ

定義

FlowDocument のテキスト コンテンツで現在有効な文字体裁のバリエーションを取得します。

public:
 property System::Windows::Documents::Typography ^ Typography { System::Windows::Documents::Typography ^ get(); };
public System.Windows.Documents.Typography Typography { get; }
member this.Typography : System.Windows.Documents.Typography
Public ReadOnly Property Typography As Typography

プロパティ値

現在有効な文字体裁のバリエーションを指定する Typography オブジェクト。 既定の文字体裁値の一覧については、Typography のトピックを参照してください。

次の例は、 要素の 属性を使用してさまざまな文字体裁のバリエーションを Typography 設定する方法を FlowDocument 示しています。

<FlowDocumentReader>
  <FlowDocument
    Typography.Capitals="SmallCaps"
    Typography.CapitalSpacing="True"
    Typography.CaseSensitiveForms="True"
    Typography.ContextualAlternates="False"
    Typography.ContextualLigatures="False"
    Typography.DiscretionaryLigatures="True"
    Typography.EastAsianExpertForms="True"
    Typography.EastAsianLanguage="Traditional"
    Typography.EastAsianWidths="Proportional"
    Typography.Fraction="Stacked"
    Typography.HistoricalForms="True"
    Typography.HistoricalLigatures="True"
    Typography.Kerning="False"
    Typography.MathematicalGreek="True"
    Typography.NumeralAlignment="Proportional"
    Typography.NumeralStyle="OldStyle"
    Typography.SlashedZero="True"
    Typography.StandardLigatures="False"
    Typography.Variants="Ruby"
  >
    <Paragraph Background="GhostWhite">
      This FlowDocument has numerous typography variations applied.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

次の例は、 プロパティのさまざまな側面をプログラムで設定する方法を Typography 示しています。

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));

// Change various default typography variations.
flowDoc.Typography.Capitals               = FontCapitals.SmallCaps;
flowDoc.Typography.CapitalSpacing         = true;
flowDoc.Typography.CaseSensitiveForms     = true;
flowDoc.Typography.ContextualAlternates   = false;
flowDoc.Typography.ContextualLigatures    = false;
flowDoc.Typography.DiscretionaryLigatures = true;
flowDoc.Typography.EastAsianExpertForms   = true;
flowDoc.Typography.EastAsianLanguage      = FontEastAsianLanguage.Traditional;
flowDoc.Typography.EastAsianWidths        = FontEastAsianWidths.Proportional;
flowDoc.Typography.Fraction               = FontFraction.Stacked;
flowDoc.Typography.HistoricalForms        = true;
flowDoc.Typography.HistoricalLigatures    = true;
flowDoc.Typography.Kerning                = false;
flowDoc.Typography.MathematicalGreek      = true;
flowDoc.Typography.NumeralAlignment       = FontNumeralAlignment.Proportional;
flowDoc.Typography.NumeralStyle           = FontNumeralStyle.OldStyle;
flowDoc.Typography.SlashedZero            = true;
flowDoc.Typography.StandardLigatures      = false;
flowDoc.Typography.Variants               = FontVariants.Ruby;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))

' Change various default typography variations.
flowDoc.Typography.Capitals = FontCapitals.SmallCaps
flowDoc.Typography.CapitalSpacing = True
flowDoc.Typography.CaseSensitiveForms = True
flowDoc.Typography.ContextualAlternates = False
flowDoc.Typography.ContextualLigatures = False
flowDoc.Typography.DiscretionaryLigatures = True
flowDoc.Typography.EastAsianExpertForms = True
flowDoc.Typography.EastAsianLanguage = FontEastAsianLanguage.Traditional
flowDoc.Typography.EastAsianWidths = FontEastAsianWidths.Proportional
flowDoc.Typography.Fraction = FontFraction.Stacked
flowDoc.Typography.HistoricalForms = True
flowDoc.Typography.HistoricalLigatures = True
flowDoc.Typography.Kerning = False
flowDoc.Typography.MathematicalGreek = True
flowDoc.Typography.NumeralAlignment = FontNumeralAlignment.Proportional
flowDoc.Typography.NumeralStyle = FontNumeralStyle.OldStyle
flowDoc.Typography.SlashedZero = True
flowDoc.Typography.StandardLigatures = False
flowDoc.Typography.Variants = FontVariants.Ruby

注釈

プロパティは Typography 、OpenType フォントにのみ適用されます。 文字体裁バリアントは、バリアントをサポートしていないフォントには影響しません。 このトピックの詳細については、「 WPF での文字体裁」を参照してください。

適用対象