語言

GlyphTypeface 建構函式

定義

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

多載

名稱 Description
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"))

備註

此建構子從由 GlyphTypeface指定的 OpenType 字型產生新typefaceSource物件。 建構物件 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 價值。

屬性

備註

此建構子從由 GlyphTypeface 和 typefaceSource指定的 OpenType 字型字型建立一個新styleSimulations物件。

適用於