Foxit PDF SDK
|
Instance Methods | |
(FSFont *) | - embed: |
Embed current font to the specified PDF document. More... | |
(int) | - getAscent |
Get the ascent value, in 1/1000 of em size (PDF units). More... | |
(NSString *) | - getBaseFontName: |
Get base font name. More... | |
(FSRectI *) | - getCharBBox: |
Get the bounding box of a character specified by unicode. More... | |
(FSRectI *) | - getCharBBoxWithPDFDoc:document: |
Get the bounding box of a character(specified by unicode) in a PDF document. More... | |
(float) | - getCharWidth: |
Get the width (in 1/1000 of em size (PDF units)) of a character specified by unicode. More... | |
(float) | - getCharWidthWithPDFDoc:document: |
Get the width (in 1/1000 of em size, as PDF units) of a character (specified by unicode) in a PDF document. More... | |
(FSFontCIDCharset) | - getCIDCharset: |
Get CID font charset. More... | |
(int) | - getDescent |
Get the descent value, in 1/1000 of em size (PDF units). More... | |
(NSString *) | - getFamilyName |
Retrieve the famliy name. More... | |
(FSFontFontTypes) | - getFontType: |
Get font type. More... | |
(NSString *) | - getName |
Retrieve the postscript name. More... | |
(FSFontStandardID) | - getStandard14Font: |
Get standard font ID. More... | |
(unsigned int) | - getStyles: |
Get font styles. More... | |
(id) | - initWithFont_file_path:face_index:charset: |
Constructor, from a font file. More... | |
(id) | - initWithFont_id: |
Constructor, by a standard font ID. More... | |
(id) | - initWithName:styles:charset:weight: |
Constructor, with given attribute. More... | |
(id) | - initWithOther: |
Constructor, with another font object. More... | |
(BOOL) | - isBold |
Judge whether current font is bold or not. More... | |
(BOOL) | - isEmbedded: |
Judge whether current font is embedded in a specified PDF document or not. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(BOOL) | - isItalic |
Judge whether current font object is italic or not. More... | |
(BOOL) | - isStandardFont: |
Check whether current font is a standard font. More... | |
(BOOL) | - isSupportEmbedded: |
Check whether current font is supported to be embedded to the specified PDF document or not. More... | |
(BOOL) | - isVertWriting: |
Check whether current font is vertical writing. More... | |
In PDF document, font is used for drawing text in PDF page.
This class represents font used in Foxit PDF SDK. This class offers different constructor for user to construct a new font object, by specified parameters, by standard font ID, or from a font file path. A font object can also be retrieved directly from other object (such as free text annotation, a text graphics object, etc) in a PDF document. This class also offers some functions to get some basic information from a font.
Embed current font to the specified PDF document.
[in] | document | A valid PDF document object. |
- (int) getAscent |
Get the ascent value, in 1/1000 of em size (PDF units).
- (NSString *) getBaseFontName: | (FSPDFDoc*) | document |
Get base font name.
[in] | document | A valid PDF document object. |
- (FSRectI *) getCharBBox: | (unsigned int) | unicode |
Get the bounding box of a character specified by unicode.
[in] | unicode | A character unicode value. |
Get the bounding box of a character(specified by unicode) in a PDF document.
[in] | unicode | A character unicode value. |
[in] | document | A valid PDF document object. |
- (float) getCharWidth: | (unsigned int) | unicode |
Get the width (in 1/1000 of em size (PDF units)) of a character specified by unicode.
[in] | unicode | A character unicode value. |
- (float) getCharWidthWithPDFDoc: | (unsigned int) | unicode | |
document: | (FSPDFDoc*) | document | |
Get the width (in 1/1000 of em size, as PDF units) of a character (specified by unicode) in a PDF document.
[in] | unicode | A character unicode value. |
[in] | document | A valid PDF document object. |
- (FSFontCIDCharset) getCIDCharset: | (FSPDFDoc*) | document |
Get CID font charset.
Applicable for CID based fonts. For rest type of font, exception FSErrUnsupported will be thrown.
[in] | document | A valid PDF document object. |
- (int) getDescent |
Get the descent value, in 1/1000 of em size (PDF units).
- (NSString *) getFamilyName |
Retrieve the famliy name.
- (FSFontFontTypes) getFontType: | (FSPDFDoc*) | document |
Get font type.
[in] | document | A valid PDF document object. |
- (NSString *) getName |
Retrieve the postscript name.
- (FSFontStandardID) getStandard14Font: | (FSPDFDoc*) | document |
Get standard font ID.
Applicable for standard fonts. For rest type of font, exception FSErrUnsupported will be thrown.
[in] | document | A valid PDF document object. |
- (unsigned int) getStyles: | (FSPDFDoc*) | document |
Get font styles.
[in] | document | A valid PDF document object. |
- (id) initWithFont_file_path: | (NSString *) | font_file_path | |
face_index: | (int) | face_index | |
charset: | (FSFontCharset) | charset | |
Constructor, from a font file.
[in] | font_file_path | A full path to an existing font file. |
[in] | face_index | The zero-based face index. Valid range: from 0 to (face_count-1). Please call the system functions to get the face_count. |
[in] | charset | The charset of the font to be created. Please refer to values starting from FSFontCharsetANSI and this should be one of these values. |
- (id) initWithFont_id: | (FSFontStandardID) | font_id |
Constructor, by a standard font ID.
[in] | font_id | Standard font ID of the font to be created. Please refer to values starting from FSFontStdIDCourier and this should be one of these values. |
- (id) initWithName: | (NSString *) | name | |
styles: | (unsigned int) | styles | |
charset: | (FSFontCharset) | charset | |
weight: | (int) | weight | |
Constructor, with given attribute.
This function is to construct font based on system fonts.
[in] | name | The PostScript name of the font to be created. |
[in] | styles | Font styles. Please refer to values starting from FSFontStyleFixedPitch and this can be one or a combination of these values. |
[in] | charset | The charset of the font to be created. Please refer to values starting from FSFontCharsetANSI and this should be one of these values. |
[in] | weight | Original font weight. 0 means unspecified. |
- (id) initWithOther: | (FSFont*) | other |
Constructor, with another font object.
[in] | other | Another font object. |
- (BOOL) isBold |
Judge whether current font is bold or not.
- (BOOL) isEmbedded: | (FSPDFDoc*) | document |
Judge whether current font is embedded in a specified PDF document or not.
[in] | document | A valid PDF document object. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (BOOL) isItalic |
Judge whether current font object is italic or not.
- (BOOL) isStandardFont: | (FSPDFDoc*) | document |
Check whether current font is a standard font.
[in] | document | A valid PDF document object. |
- (BOOL) isSupportEmbedded: | (FSPDFDoc*) | document |
Check whether current font is supported to be embedded to the specified PDF document or not.
[in] | document | A valid PDF document object. |
- (BOOL) isVertWriting: | (FSPDFDoc*) | document |
Check whether current font is vertical writing.
[in] | document | A valid PDF document object. |