PrivateFontCollection PrivateFontCollection PrivateFontCollection PrivateFontCollection Class

定義

提供從字型檔案建立的字型系列集合,這些字型檔案是由用戶端應用程式所提供。Provides a collection of font families built from font files that are provided by the client application.

public ref class PrivateFontCollection sealed : System::Drawing::Text::FontCollection
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class PrivateFontCollection : System.Drawing.Text.FontCollection
type PrivateFontCollection = class
    inherit FontCollection
Public NotInheritable Class PrivateFontCollection
Inherits FontCollection
繼承
PrivateFontCollectionPrivateFontCollectionPrivateFontCollectionPrivateFontCollection
屬性

備註

PrivateFontCollection類別可讓應用程式,以安裝現有的字型,而不需要取代系統版本的字型的私用版本。The PrivateFontCollection class allows applications to install a private version of an existing font without the requirement to replace the system version of the font. 比方說,GDI+GDI+可以建立私用版本的新細明體字型,除了系統會使用新細明體字型。For example, GDI+GDI+ can create a private version of the Arial font in addition to the Arial font that the system uses. PrivateFontCollection 也可以用來在作業系統安裝不存在的字型。PrivateFontCollection can also be used to install fonts that do not exist in the operating system. 這是暫時的字型安裝,並不會影響系統安裝的集合。This is a temporary font install that does not affect the system-installed collection. 若要查看已安裝的集合,使用InstalledFontCollection類別。To see the installed collection, use the InstalledFontCollection class.

建構函式

PrivateFontCollection() PrivateFontCollection() PrivateFontCollection() PrivateFontCollection()

初始化 PrivateFontCollection 類別的新執行個體。Initializes a new instance of the PrivateFontCollection class.

方法

AddFontFile(String) AddFontFile(String) AddFontFile(String) AddFontFile(String)

從指定的檔案將字型加入這個 PrivateFontCollectionAdds a font from the specified file to this PrivateFontCollection.

AddMemoryFont(IntPtr, Int32) AddMemoryFont(IntPtr, Int32) AddMemoryFont(IntPtr, Int32) AddMemoryFont(IntPtr, Int32)

將包含在系統記憶體中的字型加入這個 PrivateFontCollectionAdds a font contained in system memory to this PrivateFontCollection.

Dispose() Dispose() Dispose() Dispose()

釋放這個 FontCollection 所使用的所有資源。Releases all resources used by this FontCollection.

(Inherited from FontCollection)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 FontCollection 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the FontCollection and optionally releases the managed resources.

(Inherited from FontCollection)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

屬性

Families Families Families Families

取得與這個 FontFamily 相關聯的 FontCollection 物件陣列。Gets the array of FontFamily objects associated with this FontCollection.

(Inherited from FontCollection)

適用於

另請參閱