GlyphTypeface Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the GlyphTypeface class.
Overloads
GlyphTypeface() |
Initializes a new instance of the GlyphTypeface class. |
GlyphTypeface(Uri) |
Initializes a new instance of the GlyphTypeface class using the specified font file location. |
GlyphTypeface(Uri, StyleSimulations) |
Initializes a new instance of the GlyphTypeface class using the specified font file location and StyleSimulations value. |
GlyphTypeface()
Initializes a new instance of the GlyphTypeface class.
public:
GlyphTypeface();
public GlyphTypeface ();
Public Sub New ()
Applies to
GlyphTypeface(Uri)
Initializes a new instance of the GlyphTypeface class using the specified font file location.
public:
GlyphTypeface(Uri ^ typefaceSource);
public GlyphTypeface (Uri typefaceSource);
new System.Windows.Media.GlyphTypeface : Uri -> System.Windows.Media.GlyphTypeface
Public Sub New (typefaceSource As Uri)
Parameters
- typefaceSource
- Uri
The URI that specifies the location of the font file.
Examples
The following example shows how to create a new instance of the GlyphTypeface class by specifying a font file location.
// Create a glyph typeface by referencing the Kootenay OpenType font.
GlyphTypeface glyphTypeface = new GlyphTypeface(new Uri("file:///C:\\WINDOWS\\Fonts\\Kooten.ttf"));
' Create a glyph typeface by referencing the Kootenay OpenType font.
Dim glyphTypeface As New GlyphTypeface(New Uri("file:///C:\WINDOWS\Fonts\Kooten.ttf"))
Remarks
This constructor creates a new GlyphTypeface object from an OpenType font face specified by typefaceSource
. The constructed GlyphTypeface object does not use style simulations.
Applies to
GlyphTypeface(Uri, StyleSimulations)
Initializes a new instance of the GlyphTypeface class using the specified font file location and StyleSimulations value.
public:
GlyphTypeface(Uri ^ typefaceSource, System::Windows::Media::StyleSimulations styleSimulations);
[System.Security.SecurityCritical]
public GlyphTypeface (Uri typefaceSource, System.Windows.Media.StyleSimulations styleSimulations);
public GlyphTypeface (Uri typefaceSource, System.Windows.Media.StyleSimulations styleSimulations);
[<System.Security.SecurityCritical>]
new System.Windows.Media.GlyphTypeface : Uri * System.Windows.Media.StyleSimulations -> System.Windows.Media.GlyphTypeface
new System.Windows.Media.GlyphTypeface : Uri * System.Windows.Media.StyleSimulations -> System.Windows.Media.GlyphTypeface
Public Sub New (typefaceSource As Uri, styleSimulations As StyleSimulations)
Parameters
- typefaceSource
- Uri
The URI that specifies the location of the font file.
- styleSimulations
- StyleSimulations
One of the StyleSimulations values.
- Attributes
Remarks
This constructor creates a new GlyphTypeface object from an OpenType font face specified by typefaceSource
and styleSimulations
.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應