FontUtils Class Reference

#include <mw/gulutil.h>

Link against: egul.lib

class FontUtils

Detailed Description

Provides static functions for getting information about the fonts supported by a graphics device.

Member Function Documentation

GetAvailableFontsL ( const CGraphicsDevice &, CDesCArray &, TInt )

IMPORT_C voidGetAvailableFontsL(const CGraphicsDevice &aDevice,
CDesCArray &aFontNameList,
TIntaFonts = EGulNoSymbolFonts
)[static]

Gets the list of typeface names available for the graphics device.

ParameterDescription
aDeviceThe graphics device.
aFontNameListOn return, contains the list of typeface names.
aFontsCan be used to specify which sorts of typefaces are required. For possible values, see the flags defined in gulftflg.hrh beginning with EGulAllFonts.

GetAvailableHeightsInTwipsAndPointsL ( const CGraphicsDevice &, const TDesC &, CArrayFix< TInt > &, CDesCArray & )

IMPORT_C TIntGetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice &aDevice,
const TDesC &aTypefaceName,
CArrayFix< TInt > &aTwipsList,
CDesCArray &aPointsList
)[static]

Gets a list of all heights in twips, available for the named typeface and the graphics device specified.

Also gets a list of heights in points, represented as character strings.

ParameterDescription
aDeviceThe graphics device.
aTypefaceNameThe name of the typeface.
aTwipsListOn return, contains all available heights for the typeface, in twips.
aPointsListOn return, the heights in points, represented as character strings.

Returns: KErrNotSupported if the named typeface is not supported by the graphics device, otherwise KErrNone.

GetAvailableHeightsInTwipsL ( const CGraphicsDevice &, const TDesC &, CArrayFix< TInt > & )

IMPORT_C TIntGetAvailableHeightsInTwipsL(const CGraphicsDevice &aDevice,
const TDesC &aTypefaceName,
CArrayFix< TInt > &aHeightList
)[static]

Gets a list of all heights in twips, available for the named typeface and the graphics device specified.

ParameterDescription
aDeviceThe graphics device.
aTypefaceNameThe name of the typeface.
aHeightListOn return, contains all available heights for the typeface, in twips.

Returns: KErrNotSupported if the named typeface is not supported by the graphics device, otherwise KErrNone.

IndexOfNearestHeight ( CArrayFix< TInt > &, TInt )

IMPORT_C TIntIndexOfNearestHeight(CArrayFix< TInt > &aTwipsList,
TIntaHeight
)[static]

Gets the index into the supplied list of font heights of the closest match to the font height specified.

ParameterDescription
aTwipsListThe twips list.
aHeightThe requested font height. This may be generated by a call to GetAvailableHeightsInTwipsL() or GetAvailableHeightsInTwipsAndPointsL().

Returns: The index into the list of the closest font height to aHeight.

PointsFromTwips ( TInt )

IMPORT_C TIntPointsFromTwips(TIntaTwips)[static]

Converts a number of twips to points.

ParameterDescription
aTwipsA number of twips.

Returns: A number of points.

TwipsFromPoints ( TInt )

IMPORT_C TIntTwipsFromPoints(TIntaPoints)[static]

Converts a number of points into twips.

ParameterDescription
aPointsA number of points.

Returns: A number of twips.

TwipsFromPoints ( const TDesC & )

IMPORT_C TIntTwipsFromPoints(const TDesC &aPoints)[static]

Converts a number of points held as text to twips.

ParameterDescription
aPointsA number of points as text.

Returns: A number of twips.

TypefaceAttributes ( const CGraphicsDevice &, const TDesC & )

IMPORT_C TIntTypefaceAttributes(const CGraphicsDevice &aDevice,
const TDesC &aTypefaceName
)[static]

Gets the attributes of a named typeface, if supported by the graphics device.

ParameterDescription
aDeviceThe graphics device.
aTypefaceNameThe name of the typeface.

Returns: The typeface attributes. Attributes are zero if the typeface is not supported by the graphics device. Attribute values are defined in TTypeface.