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()

voidConstructL()[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 & aFontThe requested logical font.
const TZoomFactor & aZoomFactorZoom 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 & aTypefaceNameTypeface to use.

RefetchPixelMappingL()

voidRefetchPixelMappingL()

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

ReleaseAllFonts()

voidReleaseAllFonts()[private]

SetTypeface(const TTypeface)

IMPORT_C voidSetTypeface(const TTypefaceaTypeface)

Change the typeface

Parameters

const TTypeface aTypefaceThe typeface to use

Typeface()

IMPORT_C TTypefaceTypeface()const

Return the current typeface

UseSystemTypeface()

IMPORT_C voidUseSystemTypeface()

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]