Foxit::Font Class Reference

Class to represent a font object. More...

Public Member Functions

String^ GetName ()
 Retrieve the face name. More...
 
Boolean Release ()
 Release resources of current font object. More...
 

Static Public Member Functions

static FontCreate (String^ fontName, UInt32 fontStyles, Int32 weight, FontCharset charset)
 Create a new font with given attribute. More...
 
static FontCreateStandard (StandardFontID fontID)
 Create a new standard font by a standard font ID. More...
 

Properties

Int64 pointer
 Pointer to a handle of PDF font object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF font object directly.
 

Detailed Description

Class to represent a font object.

Member Function Documentation

static Font ^ Foxit::Font::Create ( String^  fontName,
UInt32  fontStyles,
Int32  weight,
FontCharset  charset 
)
static

Create a new font with given attribute.

Parameters
[in]fontNameA String object that specifies the typeface name of the font to be created.
[in]fontStylesFont styles. Please refer to enumeration Foxit::FontStyles and this can be one or combination of its values.
[in]weightOriginal font weight. 0 means unspecified.
[in]charsetThe charset of the font to be created. Please refer to enumeration Foxit::FontChaset and this should be one of its values.
Returns
A Foxit::Font object that receives the newly created font object.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter fontName is nullptr.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
static Font ^ Foxit::Font::CreateStandard ( StandardFontID  fontID)
static

Create a new standard font by a standard font ID.

Parameters
[in]fontIDStandard font ID of the font to be created. Please refer to enumeration Foxit::StandardFontID and this should be one of its values.
Returns
A Foxit::Font object that receives the newly created font object.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means value of parameter fontID is invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
String ^ Foxit::Font::GetName ( )

Retrieve the face name.

Returns
A String object that receives the face name.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
Boolean Foxit::Font::Release ( )

Release resources of current font object.

Returns
true for success, while false for failure.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Foxit Corporation