Language

FormattedText.SetFontTypeface メソッド

定義

FormattedText オブジェクトのフォント タイプフェイスを設定します。

オーバーロード

名前 説明
SetFontTypeface(Typeface)

FormattedText オブジェクト内の文字セット全体のフォント タイプフェイスを設定します。

SetFontTypeface(Typeface, Int32, Int32)

FormattedText オブジェクト内の指定した文字のサブセットのフォントタイプフェイスを設定します。

SetFontTypeface(Typeface)

FormattedText オブジェクト内の文字セット全体のフォント タイプフェイスを設定します。

public:
 void SetFontTypeface(System::Windows::Media::Typeface ^ typeface);
public void SetFontTypeface(System.Windows.Media.Typeface typeface);
member this.SetFontTypeface : System.Windows.Media.Typeface -> unit
Public Sub SetFontTypeface (typeface As Typeface)

パラメーター

typeface
Typeface

テキストの書式設定に使用する Typeface 。

注釈

Typeface は、 FontFamily、 FontWeight、 FontStyle、および FontStretchの組み合わせを表します。 Typeface では、複数のコンストラクターがサポートされています。そのうちの 1 つは書体名に基づくコンストラクトで、もう 1 つは FontFamily、 FontWeight、 FontStyle、および FontStretchの個別の値を受け取ります。

このメソッドは、テキスト文字列全体のフォントタイプフェイスを設定します。 テキスト文字列のサブセットのフォントタイプフェイスを設定するには、 SetFontTypeface(Typeface, Int32, Int32) メソッドを使用します。

適用対象

SetFontTypeface(Typeface, Int32, Int32)

FormattedText オブジェクト内の指定した文字のサブセットのフォントタイプフェイスを設定します。

public:
 void SetFontTypeface(System::Windows::Media::Typeface ^ typeface, int startIndex, int count);
public void SetFontTypeface(System.Windows.Media.Typeface typeface, int startIndex, int count);
member this.SetFontTypeface : System.Windows.Media.Typeface * int * int -> unit
Public Sub SetFontTypeface (typeface As Typeface, startIndex As Integer, count As Integer)

パラメーター

typeface
Typeface

テキストの書式設定に使用する Typeface 。

startIndex
Int32

書体を適用する最初の文字の開始インデックス。

count
Int32

書体を適用する文字数。

注釈

Typeface は、 FontFamily、 FontWeight、 FontStyle、および FontStretchの組み合わせを表します。 Typeface では、複数のコンストラクターがサポートされています。そのうちの 1 つは書体名に基づくコンストラクトで、もう 1 つは FontFamily、 FontWeight、 FontStyle、および FontStretchの個別の値を受け取ります。

テキスト文字列全体のフォントタイプフェイスを設定するには、 SetFontTypeface(Typeface) メソッドを使用します。

適用対象