Typeface クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
FontFamily、FontWeight、FontStyle、およびFontStretchの組み合わせを表します。
public ref class Typeface
public class Typeface
type Typeface = class
Public Class Typeface
- 継承
-
Typeface
例
// Return the typeface collection for the fonts in the selected URI location.
System.Collections.Generic.ICollection<Typeface> typefaces = Fonts.GetTypefaces("file:///C:\\Windows\\Fonts\\#Georgia");
// Enumerate the typefaces in the collection.
foreach (Typeface face in typefaces)
{
// Separate the URI directory source info from the font family name.
string[] familyName = face.FontFamily.Source.Split('#');
// Add the font family name, weight, and style values to the typeface combo box.
comboBoxTypeface.Items.Add(familyName[familyName.Length - 1] + " " + face.Weight + " " + face.Style);
}
comboBoxTypeface.SelectedIndex = 0;
' Return the typeface collection for the fonts in the selected URI location.
Dim typefaces As System.Collections.Generic.ICollection(Of Typeface) = Fonts.GetTypefaces("file:///C:\Windows\Fonts\#Georgia")
' Enumerate the typefaces in the collection.
For Each face As Typeface In typefaces
' Separate the URI directory source info from the font family name.
Dim familyName() As String = face.FontFamily.Source.Split("#"c)
' Add the font family name, weight, and style values to the typeface combo box.
comboBoxTypeface.Items.Add(familyName(familyName.Length - 1) & " " & face.Weight.ToString & " " & face.Style.ToString)
Next face
comboBoxTypeface.SelectedIndex = 0
注釈
タイプフェイスは、同じフォント ファミリ内のフォントの 1 つのバリエーションです。 タイプフェイスの例として、"Times New Roman" フォント ファミリの斜体バージョンがあります。 書体は、フォントの重み、スタイル、およびストレッチ機能を定義します。
コンストラクター
| 名前 | 説明 |
|---|---|
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily) |
指定したフォント ファミリ名、Typeface、Style、およびWeight値に対して、Stretch クラスの新しいインスタンスを初期化します。 さらに、フォールバック フォント ファミリが指定されています。 |
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch) |
指定したフォント ファミリ名、Typeface、Style、およびWeight値に対して、Stretch クラスの新しいインスタンスを初期化します。 |
| Typeface(String) |
指定したフォント ファミリタイプフェイス名の Typeface クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| CapsHeight |
書体の英大文字のベースラインから先頭までの距離を取得します。 |
| FaceNames |
Typefaceのカルチャ固有の名前のコレクションを取得します。 |
| FontFamily |
書体の作成元のフォント ファミリの名前を取得します。 |
| IsBoldSimulated |
Typefaceによって表されるグリフの太字の重みをシミュレートするかどうかを決定します。 |
| IsObliqueSimulated |
Typefaceによって表されるグリフの斜体スタイルをシミュレートするかどうかを指定します。 |
| Stretch |
Typefaceのストレッチ値を取得します。 ストレッチ値は、書体が表示されるときに展開されるか、または縮小されるかを決定します。 |
| StrikethroughPosition |
書体のベースラインから取り消し線までの距離を示す値を取得します。 |
| StrikethroughThickness |
フォントの em サイズに対する取り消し線の太さを示す値を取得します。 |
| Style |
Typefaceのスタイルを取得します。 |
| UnderlinePosition |
書体のベースラインからの下線の距離を示す値を取得します。 |
| UnderlineThickness |
書体のフォント em サイズに対する下線の太さを示す値を取得します。 |
| Weight |
書体の相対的な重みを取得します。 |
| XHeight |
書体の英小文字のベースラインから先頭までの距離を取得します。 距離はアセンダーを除外します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
現在の書体と指定した書体が同じ FontFamily、 Style、 Weight、 Stretch、フォールバック フォント値を持っているかどうかを示す値を取得します。 |
| GetHashCode() |
Typefaceのハッシュ関数として機能します。 ハッシュ アルゴリズムやハッシュ テーブルなどのデータ構造での使用に適しています。 |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
| TryGetGlyphTypeface(GlyphTypeface) |
GlyphTypefaceに対応するTypefaceを取得します。 |