GlyphTypeface 建構函式

定義

初始化 GlyphTypeface 類別的新執行個體。

多載

GlyphTypeface()

初始化 GlyphTypeface 類別的新執行個體。

GlyphTypeface(Uri)

使用指定的字型檔位置,初始化 GlyphTypeface 類別的新執行個體。

GlyphTypeface(Uri, StyleSimulations)

使用指定的字型檔位置和 GlyphTypeface 值,初始化 StyleSimulations 類別的新執行個體。

GlyphTypeface()

初始化 GlyphTypeface 類別的新執行個體。

public:
 GlyphTypeface();
public GlyphTypeface ();
Public Sub New ()

適用於

GlyphTypeface(Uri)

使用指定的字型檔位置,初始化 GlyphTypeface 類別的新執行個體。

public:
 GlyphTypeface(Uri ^ typefaceSource);
public GlyphTypeface (Uri typefaceSource);
new System.Windows.Media.GlyphTypeface : Uri -> System.Windows.Media.GlyphTypeface
Public Sub New (typefaceSource As Uri)

參數

typefaceSource
Uri

指定字型檔案位置的 URI。

範例

下列範例示範如何藉由指定字型檔案位置來建立 類別的新實例 GlyphTypeface

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

備註

這個建構函式會從 所 typefaceSource 指定的 OpenType 字型臉部建立新的 GlyphTypeface 物件。 建構 GlyphTypeface 的物件不會使用樣式模擬。

適用於

GlyphTypeface(Uri, StyleSimulations)

使用指定的字型檔位置和 GlyphTypeface 值,初始化 StyleSimulations 類別的新執行個體。

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)

參數

typefaceSource
Uri

指定字型檔案位置的 URI。

styleSimulations
StyleSimulations

其中一個 StyleSimulations 值。

屬性

備註

這個建構函式會從 和 styleSimulationstypefaceSource 指定的 OpenType 字型臉部建立新的 GlyphTypeface 物件。

適用於