共用方式為


IDWriteFactory::CreateCustomFontCollection 方法 (dwrite.h)

使用自訂字型集合載入器建立字型集合。

語法

HRESULT CreateCustomFontCollection(
        IDWriteFontCollectionLoader *collectionLoader,
  [in]  void const                  *collectionKey,
        UINT32                      collectionKeySize,
  [out] IDWriteFontCollection       **fontCollection
);

參數

collectionLoader

類型: IDWriteFontCollectionLoader*

應用程式定義的字型集合載入器,先前必須使用 RegisterFontCollectionLoader 註冊。

[in] collectionKey

類型: const void*

載入器用來識別字型檔案集合的索引鍵。 配置給此索引鍵的緩衝區至少應該是 collectionKeySize 的大小。

collectionKeySize

類型: UINT32

集合索引鍵的大小,以位元組為單位。

[out] fontCollection

類型: IDWriteFontCollection**

如果方法成功,則包含系統字型集合物件的指標位址,如果發生失敗,則為 NULL

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

需求
最低支援的用戶端 適用於 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 dwrite.h
程式庫 Dwrite.lib
Dll Dwrite.dll

另請參閱

IDWriteFactory