Typeface Construtores

Definição

Inicializa uma nova instância da classe Typeface.

Sobrecargas

Typeface(String)

Inicializa uma nova instância da classe Typeface para o nome da face de tipos da família de fontes especificado.

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Inicializa uma nova instância da classe Typeface do nome da família de fontes especificado e os valores Style, Weight e Stretch.

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

Inicializa uma nova instância da classe Typeface do nome da família de fontes especificado e os valores Style, Weight e Stretch. Além disso, uma família de fontes de fallback é especificada.

Typeface(String)

Inicializa uma nova instância da classe Typeface para o nome da face de tipos da família de fontes 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

O nome da face de tipos da família de fontes especificada.

Exemplos

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

Aplica-se a

Typeface(FontFamily, FontStyle, FontWeight, FontStretch)

Inicializa uma nova instância da classe Typeface do nome da família de fontes especificado e os valores Style, Weight e Stretch.

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

A família de fontes da face de tipos.

style
FontStyle

O estilo da face de tipos.

weight
FontWeight

O peso relativo da face de tipos.

stretch
FontStretch

O grau ao qual a face de tipos é estendida.

Exemplos

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

Aplica-se a

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

Inicializa uma nova instância da classe Typeface do nome da família de fontes especificado e os valores Style, Weight e Stretch. Além disso, uma família de fontes de fallback é especificada.

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

A família de fontes da face de tipos.

style
FontStyle

O estilo da face de tipos.

weight
FontWeight

O peso relativo da face de tipos.

stretch
FontStretch

O grau ao qual a face de tipos é estendida.

fallbackFontFamily
FontFamily

A família de fontes é usada quando um caractere é encontrado que a família de fontes principal (especificada pelo parâmetro fontFamily) não pode exibir.

Exemplos

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

Comentários

Passar null para o fallbackFontFamily parâmetro faz com que caracteres de caixa sejam exibidos para caracteres não incluídos na família de fontes primária.

Aplica-se a