MOpenFontTrueTypeExtension Class Reference

#include <openfont.h>

class MOpenFontTrueTypeExtension
Public Member Functions
pure virtual TAny *GetTrueTypeTable(TInt &, TUint32, TInt *)
pure virtual TBool HasTrueTypeTable(TUint32)
pure virtual TInt ReleaseTrueTypeTable(TAny *)

Detailed Description

TrueType extension for Open Fonts.

If an open font is able to load TrueType or OpenType tables it should derive from this class.

This class will be used by

This interface should be returned by the overridden COpenFont::ExtendedInterface function when KUidOpenFontTrueTypeExtension is supplied as the UID.

See also: KUidOpenFontTrueTypeExtension

Member Function Documentation

GetTrueTypeTable ( TInt &, TUint32, TInt * )

TAny *GetTrueTypeTable(TInt &aError,
TUint32aTag,
TInt *aLength
)[pure virtual]

Returns the specified table. The table need not be released by the caller, so the deriver is responsible for ensuring that any memory allocated is ultimately cleaned up. The caller must not delete or modify the data returned.

See also: ReleaseTrueTypeTable

ParameterDescription
aErrorReturns KErrNone if successful or one of the system-wide error codes if unsuccessful. Returns KErrNotSupported if the table does not exist in the font file.
aTagThe tag of the table, with the first character in the most significant byte. For example, the "vhea" table is obtained by passing in 'v'<<24 | 'h'<<16 | 'e'<<8 | 'a'.
aLengthThe length of the table in bytes that has been returned or 0 if unsuccessful.

Returns: The table, if successful.

HasTrueTypeTable ( TUint32 )

TBool HasTrueTypeTable(TUint32aTag)[pure virtual]

Determines if the font file has a particular table.

See also: GetTrueTypeTable

ParameterDescription
aTagThe tag of the table as for GetTrueTypeTable.

Returns: True if the table exists in the font file, false otherwise.

ReleaseTrueTypeTable ( TAny * )

TInt ReleaseTrueTypeTable(TAny *aTable)[pure virtual]

Releases a table obtained by GetTrueTypeTable. The caller must not use the table after this call.

See also: GetTrueTypeTable

ParameterDescription
aTableThe table to be released.