MOpenFontShapingExtension Class Reference

#include <openfont.h>

class MOpenFontShapingExtension
Public Member Functions
pure virtual voidGetExtensionFontMetrics(TExtensionFontMetrics &)
pure virtual TInt GlyphIndex(TInt)
pure virtual TBool GlyphPointInFontUnits(TInt, TInt, TInt &, TInt &)
pure virtual TBool GlyphPointInHintedPixels(TInt, TInt, TReal &, TReal &)
pure virtual voidRasterizeGlyphL(TInt, TOpenFontGlyphData *)

Detailed Description

Open Font System Extension Interface abstract base class.

COpenFont derivers should also derive from this interface to enable complex font "shaping".

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

See also: COpenFont KUidOpenFontShapingExtension

Member Function Documentation

GetExtensionFontMetrics ( TExtensionFontMetrics & )

voidGetExtensionFontMetrics(TExtensionFontMetrics &aOut)[pure virtual]

Returns font metrics.

ParameterDescription
aOutFont metrics returned.

GlyphIndex ( TInt )

TInt GlyphIndex(TIntaUnicodeCharacter)const [pure virtual]

Maps a character to a glyph index.

ParameterDescription
aUnicodeCharacterUnicode character code to be mapped.

Returns: Glyph code corresponding to aUnicodeCharacter.

GlyphPointInFontUnits ( TInt, TInt, TInt &, TInt & )

TBool GlyphPointInFontUnits(TIntaGlyphIndex,
TIntaPointNumber,
TInt &aX,
TInt &aY
)const [pure virtual]

Returns the coordinates of a particular (unhinted) point in the outline of the given glyph in font units.

ParameterDescription
aPointNumberThe number of the point.
aXReturns the point's X co-ordinate in font units.
aYReturns the point's Y co-ordinate in font units.

Returns: True on success, false otherwise.

GlyphPointInHintedPixels ( TInt, TInt, TReal &, TReal & )

TBool GlyphPointInHintedPixels(TIntaGlyphIndex,
TIntaPointNumber,
TReal &aX,
TReal &aY
)const [pure virtual]

Returns the hinted pixel coordinates of a particular point in the outline of the given glyph.

ParameterDescription
aPointNumberThe number of the point.
aXReturns the point's X pixel value.
aYReturns the point's Y pixel value.

Returns: True on success, false otherwise.

RasterizeGlyphL ( TInt, TOpenFontGlyphData * )

voidRasterizeGlyphL(TIntaCode,
TOpenFontGlyphData *aGlyphData
)[pure virtual]

Creates a bitmap for the specified Glyph code.

Implementations of this function should put the bitmap in aGlyphData->iBitmapBuffer, and the character metrics are placed in aGlyphData->iMetricsBuffer. The other parts of aGlyphData should be left alone.

This function provides the same functionality as the COpenFont::RasterizeL() except that the glyph code is supplied rather than the unicode.

For more information:

See also: COpenFont::RasterizeL()

ParameterDescription
aCodeThe glyph code of the character for which the bitmap is required.
aGlyphDataThe function puts its output here.