共用方式為


IXpsOMGlyphsEditor::GetGlyphIndices 方法 (xpsobjectmodel.h)

取得描述字型中特定字元索引之 XPS_GLYPH_INDEX 結構的陣列。

語法

HRESULT GetGlyphIndices(
  [in, out] UINT32          *indexCount,
  [out]     XPS_GLYPH_INDEX *glyphIndices
);

參數

[in, out] indexCount

符合 glyphIndices 參數所參考陣列中的元素數目。 當方法傳回時,indexCount會包含glyphIndices所參考陣列中所傳回的XPS_GLYPH_INDEX結構數目。

[out] glyphIndices

接收字元索引的 XPS_GLYPH_INDEX 結構陣列。

傳回值

方法會傳回 HRESULT。 可能的值包括下列資料表中的值,但不限於這些值。 如需此表格中未列出的 XPS 檔 API 傳回值的相關資訊,請參閱 XPS 檔錯誤

傳回碼 描述
S_OK
此方法已成功。
E_POINTER
indexCountglyphIndicesNull,或兩者都是 Null
ERROR_MORE_DATA
glyphIndices 不夠大,無法接收字元索引資料。 indexCount 包含必要的專案數目。

備註

在 glyphIndices中傳回的字元索引會覆寫從UnicodeString屬性到字元索引的預設 cmap 對應。 每個 XPS_GLYPH_INDEX 結構也包含進階寬度和垂直和水準位移資訊。

GetGlyphIndexCount 會取得字元索引陣列中的元素數目。

規格需求

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

另請參閱

IXpsOMGlyphsEditor

XML Paper Specification

XPS 檔錯誤

XPS_GLYPH_INDEX