Typeface Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da Typeface classe.
Sobrecargas
| Name | Description |
|---|---|
| Typeface(String) |
Inicializa uma nova instância da Typeface classe para o nome de fonte da família de fontes especificada. |
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch) |
Inicializa uma nova instância da Typeface classe para o nome da família de fonte especificado, Style, Weight, e Stretch valores. |
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily) |
Inicializa uma nova instância da Typeface classe para o nome da família de fonte especificado, Style, Weight, e Stretch valores. Além disso, é especificada uma família de fontes de recurso alternativo. |
Typeface(String)
Inicializa uma nova instância da Typeface classe para o nome de fonte da família de fontes especificada.
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 fonte para a 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)
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 do tipo de letra.
- style
- FontStyle
O estilo da tipografia.
- weight
- FontWeight
O peso relativo da tipografia.
- stretch
- FontStretch
O grau em que a tipografia é esticada.
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)
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 do tipo de letra.
- style
- FontStyle
O estilo da tipografia.
- weight
- FontWeight
O peso relativo da tipografia.
- stretch
- FontStretch
O grau em que a tipografia é esticada.
- fallbackFontFamily
- FontFamily
A família de fontes utilizada quando um carácter é encontrado e que a família de fontes primárias (especificada pelo fontFamily parâmetro) não pode ser exibida.
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"))
Observações
Passar null pelo fallbackFontFamily parâmetro faz com que os caracteres caixa sejam exibidos para caracteres que não estão incluídos na família de fontes primárias.