THotPDF.GetLoadedFontInfo Method
方法摘要: THotPDF.GetLoadedFontInfo Method
声明
function GetLoadedFontInfo(PageIndex, FontIndex: Integer; out AFontName, AEncoding: AnsiString): boolean;
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
PageIndex | 目标页面的零起始索引 |
FontIndex | 目标字体在页面字体资源字典中的零起始索引 |
AFontName | GetLoadedFontInfo 使用的输入 |
返回值
返回布尔值
使用注意事项
- 调用前应先通过 GetLoadedFontCount 确认有效索引范围,避免越界
- 返回的 AFontName 为 PDF 内部名称,子集嵌入字体通常带有六字母前缀(如 ABCDEF+)
- 如需访问字体完整属性(如 Widths、FontDescriptor),应进一步调用 GetLoadedFontDict 获取字典对象