|
Foxit PDF SDK
|
构造函数 | |
| (FSUInt32Array *) | - addUnicodes:unicode_array: |
| 向当前嵌入字体添加Unicode字符。 更多... | |
| (FSFont *) | - embed:is_add_all_unicodes: |
| 将当前字体嵌入到指定的PDF文档中。 更多... | |
| (int) | - getAscent |
| 获取上升值,以1/1000 em大小为单位(PDF单位)。 更多... | |
| (NSString *) | - getBaseFontName: |
| 获取基础字体名称。 更多... | |
| (FSRectI *) | - getCharBBox: |
| 获取由Unicode指定的字符的边界框。 更多... | |
| (FSRectI *) | - getCharBBoxWithPDFDoc:document: |
| 获取PDF文档中由Unicode指定的字符的边界框。 更多... | |
| (float) | - getCharWidth: |
| 获取由Unicode指定的字符的宽度(以1/1000 em大小为单位(PDF单位))。 更多... | |
| (float) | - getCharWidthWithPDFDoc:document: |
| 获取PDF文档中由Unicode指定的字符的宽度(以1/1000 em大小为单位,作为PDF单位)。 更多... | |
| (FSFontCIDCharset) | - getCIDCharset: |
| 获取CID字体字符集。 更多... | |
| (int) | - getDescent |
| 获取下降值,以1/1000 em大小为单位(PDF单位)。 更多... | |
| (NSString *) | - getEncoding: |
| 获取当前字体编码。 更多... | |
| (NSString *) | - getFamilyName |
| 检索字体族名称。 更多... | |
| (FSFontFontTypes) | - getFontType: |
| 获取字体类型。 更多... | |
| (NSString *) | - getName |
| 检索PostScript名称。 更多... | |
| (FSFontStandardID) | - getStandard14Font: |
| 获取标准字体ID。 更多... | |
| (unsigned int) | - getStyles: |
| 获取字体样式。 更多... | |
| (id) | - initWithFont_file_path:face_index:charset: |
| 从字体文件的构造函数。 更多... | |
| (id) | - initWithFont_id: |
| 通过标准字体ID的构造函数。 更多... | |
| (id) | - initWithName:styles:charset:weight: |
| 带有给定属性的构造函数。 更多... | |
| (id) | - initWithOther: |
| 使用另一个字体对象的构造函数。 更多... | |
| (BOOL) | - isBold |
| 判断当前字体是否为粗体。 更多... | |
| (BOOL) | - isCharSupported:document: |
| 检查当前字体是否支持某字符。 更多... | |
| (BOOL) | - isEmbedded: |
| 判断当前字体是否嵌入在指定的PDF文档中。 更多... | |
| (BOOL) | - isEmpty |
| 检查当前对象是否为空。 更多... | |
| (BOOL) | - isItalic |
| 判断当前字体对象是否为斜体。 更多... | |
| (BOOL) | - isStandardFont: |
| 检查当前字体是否为标准字体。 更多... | |
| (BOOL) | - isSupportEmbedded: |
| 检查当前字体是否支持嵌入到指定的PDF文档中。 更多... | |
| (BOOL) | - isVertWriting: |
| 检查当前字体是否为垂直书写。 更多... | |
| (BOOL) | - setEncoding:value: |
| 设置当前字体编码。 更多... | |
在PDF文档中,字体用于在PDF页面中绘制文本。
此类表示在Foxit PDF SDK中使用的字体。此类为用户提供不同的构造函数来构造 新的字体对象,通过指定参数、标准字体ID或从字体文件路径。 字体对象也可以直接从PDF文档中的其他对象(如自由文本注释、 文本图形对象等)中检索。 此类还提供一些函数来获取字体的一些基本信息。
| - (FSUInt32Array *) addUnicodes: | (FSPDFDoc*) | document | |
| unicode_array: | (FSUInt32Array*) | unicode_array | |
向当前嵌入字体添加Unicode字符。
此函数仅支持新嵌入的字体。
| [in] | document | 有效的PDF文档对象。 |
| [in] | unicode_array | 要嵌入的Unicode数组。 |
| - (FSFont *) embed: | (FSPDFDoc*) | document | |
| is_add_all_unicodes: | (BOOL) | is_add_all_unicodes | |
将当前字体嵌入到指定的PDF文档中。
| [in] | document | 有效的PDF文档对象。 |
| [in] | is_add_all_unicodes | 如果没有添加文档中的Unicode字符,是否将从0x0到0xFFFF的Unicode字符 添加到当前嵌入字体中。 YES 表示嵌入从0x0到0xFFFF的Unicode字符, NO 表示只嵌入一个Unicode字符。默认值:YES。 用户可以通过 FSFont::addUnicodes:unicode_array: 添加Unicode字符。 |
| - (int) getAscent |
获取上升值,以1/1000 em大小为单位(PDF单位)。
| - (NSString *) getBaseFontName: | (FSPDFDoc*) | document |
获取基础字体名称。
| [in] | document | 有效的PDF文档对象。 |
| - (FSRectI *) getCharBBox: | (unsigned int) | unicode |
获取由Unicode指定的字符的边界框。
| [in] | unicode | 字符的Unicode值。 |
| - (FSRectI *) getCharBBoxWithPDFDoc: | (unsigned int) | unicode | |
| document: | (FSPDFDoc*) | document | |
获取PDF文档中由Unicode指定的字符的边界框。
| [in] | unicode | 字符的Unicode值。 |
| [in] | document | 有效的PDF文档对象。 |
| - (float) getCharWidth: | (unsigned int) | unicode |
获取由Unicode指定的字符的宽度(以1/1000 em大小为单位(PDF单位))。
| [in] | unicode | 字符的Unicode值。 |
| - (float) getCharWidthWithPDFDoc: | (unsigned int) | unicode | |
| document: | (FSPDFDoc*) | document | |
获取PDF文档中由Unicode指定的字符的宽度(以1/1000 em大小为单位,作为PDF单位)。
| [in] | unicode | 字符的Unicode值。 |
| [in] | document | 有效的PDF文档对象。 |
| - (FSFontCIDCharset) getCIDCharset: | (FSPDFDoc*) | document |
获取CID字体字符集。
适用于基于CID的字体。对于其他类型的字体,将抛出异常 FSErrUnsupported。
| [in] | document | 有效的PDF文档对象。 |
| - (int) getDescent |
获取下降值,以1/1000 em大小为单位(PDF单位)。
| - (NSString *) getEncoding: | (FSPDFDoc*) | document |
获取当前字体编码。
| [in] | document | 有效的PDF文档对象。 |
| - (NSString *) getFamilyName |
检索字体族名称。
| - (FSFontFontTypes) getFontType: | (FSPDFDoc*) | document |
| - (NSString *) getName |
检索PostScript名称。
| - (FSFontStandardID) getStandard14Font: | (FSPDFDoc*) | document |
获取标准字体ID。
适用于标准字体。对于其他类型的字体,将抛出异常 FSErrUnsupported。
| [in] | document | 有效的PDF文档对象。 |
| - (unsigned int) getStyles: | (FSPDFDoc*) | document |
| - (id) initWithFont_file_path: | (NSString *) | font_file_path | |
| face_index: | (int) | face_index | |
| charset: | (FSFontCharset) | charset | |
从字体文件的构造函数。
| [in] | font_file_path | 现有字体文件的完整路径。 |
| [in] | face_index | 基于零的字体面索引。有效范围:从0到(face_count-1)。 请调用系统函数获取face_count。 |
| [in] | charset | 要创建的字体的字符集。请参考从 FSFontCharsetANSI 开始的值,应该是这些值中的一个。 |
| - (id) initWithFont_id: | (FSFontStandardID) | font_id |
通过标准字体ID的构造函数。
| [in] | font_id | 要创建的字体的标准字体ID。请参考从 FSFontStdIDCourier 开始的值,应该是这些值中的一个。 |
| - (id) initWithName: | (NSString *) | name | |
| styles: | (unsigned int) | styles | |
| charset: | (FSFontCharset) | charset | |
| weight: | (int) | weight | |
带有给定属性的构造函数。
此函数用于基于系统字体构造字体。
| [in] | name | 要创建的字体的PostScript名称。 |
| [in] | styles | 字体样式。请参考从 FSFontStyleFixedPitch 开始的值, 可以是这些值中的一个或组合。 |
| [in] | charset | 要创建的字体的字符集。请参考从 FSFontCharsetANSI 开始的值,应该是这些值中的一个。 |
| [in] | weight | 原始字体粗细。0表示未指定。 |
| - (id) initWithOther: | (FSFont*) | other |
使用另一个字体对象的构造函数。
| [in] | other | 另一个字体对象。 |
| - (BOOL) isBold |
判断当前字体是否为粗体。
| - (BOOL) isCharSupported: | (unsigned int) | unicode | |
| document: | (FSPDFDoc*) | document | |
检查当前字体是否支持某字符。
| [in] | unicode | 字符unicode码。 |
| [in] | document | 文档对象,如果字体没有内嵌到文档中,这个参数是空对象。 |
| - (BOOL) isEmbedded: | (FSPDFDoc*) | document |
判断当前字体是否嵌入在指定的PDF文档中。
| [in] | document | 有效的PDF文档对象。 |
| - (BOOL) isEmpty |
检查当前对象是否为空。
当当前对象为空时,意味着当前对象无用。
| - (BOOL) isItalic |
判断当前字体对象是否为斜体。
| - (BOOL) isStandardFont: | (FSPDFDoc*) | document |
检查当前字体是否为标准字体。
| [in] | document | 有效的PDF文档对象。 |
| - (BOOL) isSupportEmbedded: | (FSPDFDoc*) | document |
检查当前字体是否支持嵌入到指定的PDF文档中。
| [in] | document | 有效的PDF文档对象。 |
| - (BOOL) isVertWriting: | (FSPDFDoc*) | document |
检查当前字体是否为垂直书写。
| [in] | document | 有效的PDF文档对象。 |
| - (BOOL) setEncoding: | (FSPDFDoc*) | document | |
| value: | (NSString *) | value | |
设置当前字体编码。
| [in] | document | 有效的PDF文档对象。 |
| [in] | value | 要设置的字体编码。有关编码值,请参考 <PDF reference 1.7>第442页中的"TABLE 5.15 Predefined CJK CMap names"。 此参数不应为空字符串。 |