Typeface Konstruktoren

Definition

Initialisiert eine neue Instanz der Typeface-Klasse.

Überlädt

Name Beschreibung
Typeface(String)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen.

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen, , Style, Weightund Stretch Werte.

Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen, , Style, Weightund Stretch Werte. Darüber hinaus wird eine Fallbackschriftartfamilie angegeben.

Typeface(String)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen.

public:
 Typeface(System::String ^ typefaceName);
public Typeface(string typefaceName);
new System.Windows.Media.Typeface : string -> System.Windows.Media.Typeface
Public Sub New (typefaceName As String)

Parameter

typefaceName
String

Der Schriftartname für die angegebene Schriftartfamilie.

Beispiele

// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");

// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed);

// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed,
                                                 new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")

' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)

' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))

Gilt für:

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen, , Style, Weightund Stretch Werte.

public:
 Typeface(System::Windows::Media::FontFamily ^ fontFamily, System::Windows::FontStyle style, System::Windows::FontWeight weight, System::Windows::FontStretch stretch);
public Typeface(System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle style, System.Windows.FontWeight weight, System.Windows.FontStretch stretch);
new System.Windows.Media.Typeface : System.Windows.Media.FontFamily * System.Windows.FontStyle * System.Windows.FontWeight * System.Windows.FontStretch -> System.Windows.Media.Typeface
Public Sub New (fontFamily As FontFamily, style As FontStyle, weight As FontWeight, stretch As FontStretch)

Parameter

fontFamily
FontFamily

Die Schriftartfamilie der Schriftart.

style
FontStyle

Der Stil der Schriftart.

weight
FontWeight

Die relative Gewichtung der Schriftart.

stretch
FontStretch

Der Grad, in dem die Schriftart gestreckt wird.

Beispiele

// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");

// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed);

// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed,
                                                 new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")

' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)

' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))

Gilt für:

Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily)

Initialisiert eine neue Instanz der Typeface Klasse für den angegebenen Schriftartfamiliennamen, , Style, Weightund Stretch Werte. Darüber hinaus wird eine Fallbackschriftartfamilie angegeben.

public:
 Typeface(System::Windows::Media::FontFamily ^ fontFamily, System::Windows::FontStyle style, System::Windows::FontWeight weight, System::Windows::FontStretch stretch, System::Windows::Media::FontFamily ^ fallbackFontFamily);
public Typeface(System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle style, System.Windows.FontWeight weight, System.Windows.FontStretch stretch, System.Windows.Media.FontFamily fallbackFontFamily);
new System.Windows.Media.Typeface : System.Windows.Media.FontFamily * System.Windows.FontStyle * System.Windows.FontWeight * System.Windows.FontStretch * System.Windows.Media.FontFamily -> System.Windows.Media.Typeface
Public Sub New (fontFamily As FontFamily, style As FontStyle, weight As FontWeight, stretch As FontStretch, fallbackFontFamily As FontFamily)

Parameter

fontFamily
FontFamily

Die Schriftartfamilie der Schriftart.

style
FontStyle

Der Stil der Schriftart.

weight
FontWeight

Die relative Gewichtung der Schriftart.

stretch
FontStretch

Der Grad, in dem die Schriftart gestreckt wird.

fallbackFontFamily
FontFamily

Die Schriftartfamilie, die verwendet wird, wenn ein Zeichen gefunden wird, dass die primäre Schriftartfamilie (angegeben durch den fontFamily Parameter) nicht angezeigt werden kann.

Beispiele

// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");

// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed);

// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
                                                 FontStyles.Italic,
                                                 FontWeights.ExtraBold,
                                                 FontStretches.Condensed,
                                                 new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")

' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)

' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))

Hinweise

Die Übergabe null für den fallbackFontFamily Parameter bewirkt, dass Feldzeichen für Zeichen angezeigt werden, die nicht in der primären Schriftartfamilie enthalten sind.

Gilt für: