IXpsOMGlyphsEditor::SetGlyphIndices 方法 (xpsobjectmodel.h)
設定 XPS_GLYPH_INDEX 結構陣列,描述要用於字型中的字元索引。
語法
HRESULT SetGlyphIndices(
[in] UINT32 indexCount,
[in] const XPS_GLYPH_INDEX *glyphIndices
);
參數
[in] indexCount
字元Indices 所參考之陣列中的XPS_GLYPH_INDEX結構數目。 0 的值會清除 屬性。
[in] glyphIndices
包含字元索引 之XPS_GLYPH_INDEX 結構的陣列。 如果 indexCount 為 0,則會忽略此參數。
傳回值
方法會傳回 HRESULT。 可能的值包括但不限於下列數據表中的值。 如需此表格中未列出的 XPS 檔 API 傳回值的相關信息,請參閱 XPS 檔錯誤。
傳回碼 | 描述 |
---|---|
|
此方法已成功。 |
|
一或多個XPS_GLYPH_INDEX結構的索引欄位具有無效的值。 索引字段必須具有介於 -1 和 65535 (0xFFFF) 之間的值。 |
|
glyphIndices 為 NULL ,且 indexCount 大於 0。 |
|
一或多個XPS_GLYPH_INDEX結構的 advanceWidth、horizontalOffset 或 verticalOffset 字段具有無效的浮點值。 |
|
一或多個XPS_GLYPH_INDEX結構的 advanceWidth 字段具有無效的值。 advanceWidth 字段必須有非負值或剛好 –1.0 的值;不完全為 –1.0 的負值無效。 |
備註
傳入 glyphIndices 的字元索引會覆寫從 UnicodeString 屬性到字元索引的預設 cmap 對應。 每個 XPS_GLYPH_INDEX 結構也有進階寬度和垂直和水準位移資訊。
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 | 適用於 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 |