Typeface Constructores

Definición

Inicializa una nueva instancia de la clase Typeface.

Sobrecargas

Nombre Description
Typeface(String)

Inicializa una nueva instancia de la Typeface clase para el nombre de tipo de letra de familia de fuentes especificado.

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Inicializa una nueva instancia de la Typeface clase para el nombre Stylede familia de fuentes, , Weighty Stretch valores especificados.

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

Inicializa una nueva instancia de la Typeface clase para el nombre Stylede familia de fuentes, , Weighty Stretch valores especificados. Además, se especifica una familia de fuentes de reserva.

Typeface(String)

Inicializa una nueva instancia de la Typeface clase para el nombre de tipo de letra de familia de fuentes especificado.

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)

Parámetros

typefaceName
String

Nombre del tipo de letra de la familia de fuentes especificada.

Ejemplos

// 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"))

Se aplica a

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Inicializa una nueva instancia de la Typeface clase para el nombre Stylede familia de fuentes, , Weighty Stretch valores especificados.

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)

Parámetros

fontFamily
FontFamily

Familia de fuentes del tipo de letra.

style
FontStyle

Estilo del tipo de letra.

weight
FontWeight

Peso relativo del tipo de letra.

stretch
FontStretch

Grado en el que se extiende el tipo de letra.

Ejemplos

// 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"))

Se aplica a

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

Inicializa una nueva instancia de la Typeface clase para el nombre Stylede familia de fuentes, , Weighty Stretch valores especificados. Además, se especifica una familia de fuentes de reserva.

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)

Parámetros

fontFamily
FontFamily

Familia de fuentes del tipo de letra.

style
FontStyle

Estilo del tipo de letra.

weight
FontWeight

Peso relativo del tipo de letra.

stretch
FontStretch

Grado en el que se extiende el tipo de letra.

fallbackFontFamily
FontFamily

La familia de fuentes que se usa cuando se encuentra un carácter que la familia de fuentes principal (especificada por el fontFamily parámetro) no se puede mostrar.

Ejemplos

// 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"))

Comentarios

Pasar null para el fallbackFontFamily parámetro hace que los caracteres de cuadro se muestren para los caracteres no incluidos en la familia de fuentes principal.

Se aplica a