CCoeFontProvider Class Reference

class CCoeFontProvider : public CBase

A helper object designed to make obtaining a font easier, taking into account zoom factors.

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CCoeFontProvider(const TDesC &)

CCoeFontProvider ( const TDesC & aTypefaceName ) [private]

Constructor

Parameters

const TDesC & aTypefaceName

~CCoeFontProvider()

~CCoeFontProvider ( )

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

Symbian second-phase constructor

Font(const TCoeFont &, const TZoomFactor &)

IMPORT_C const CFont & Font ( const TCoeFont & aFont,
const TZoomFactor & aZoomFactor
) const

Returns the closest available match to the specified logical font and zoom factor. Note that all CFont objects referenced through this method are owned by the font provider. Thus do not explicitly release the font object after use!

A default font provider is made available by the CCoeEnv singleton and returned from CCoeControl::FindFontProvider() if no overriding font provider has been attached to the control tree.

For an example of how to use this function, see CCoeControl::ScreenFont() .

CCoeControl::ScreenFont() CCoeControl::FindFontProvider() CCoeControl::AccumulatedZoom()

Parameters

const TCoeFont & aFont The requested logical font.
const TZoomFactor & aZoomFactor Zoom factor used when deriving the font height.

NewL()

IMPORT_C CCoeFontProvider * NewL ( ) [static]

Standard Symbian factory method. Uses a default typeface

NewL(const TDesC &)

IMPORT_C CCoeFontProvider * NewL ( const TDesC & aTypefaceName ) [static]

Standard Symbian factory method. Typeface to use is provided by caller.

Parameters

const TDesC & aTypefaceName Typeface to use.

RefetchPixelMappingL()

void RefetchPixelMappingL ( )

flushes the array & refetches the logical-to-pixel mapping. Called when global control settings are updated

ReleaseAllFonts()

void ReleaseAllFonts ( ) [private]

SetTypeface(const TTypeface)

IMPORT_C void SetTypeface ( const TTypeface aTypeface )

Change the typeface

Parameters

const TTypeface aTypeface The typeface to use

Typeface()

IMPORT_C TTypeface Typeface ( ) const

Return the current typeface

UseSystemTypeface()

IMPORT_C void UseSystemTypeface ( )

Use the system typeface

Member Data Documentation

RArray< TFont > iFonts

RArray < TFont > iFonts [private]

RArray< TInt > iLogicalToPixelSizes

RArray < TInt > iLogicalToPixelSizes [private]

TTypeface iTypeface

TTypeface iTypeface [private]