#include <mw/gulutil.h>
class FontUtils |
Public Member Functions | |
---|---|
IMPORT_C void | GetAvailableFontsL(const CGraphicsDevice &, CDesCArray &, TInt) |
IMPORT_C TInt | GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice &, const TDesC &, CArrayFix< TInt > &, CDesCArray &) |
IMPORT_C TInt | GetAvailableHeightsInTwipsL(const CGraphicsDevice &, const TDesC &, CArrayFix< TInt > &) |
IMPORT_C TInt | IndexOfNearestHeight(CArrayFix< TInt > &, TInt) |
IMPORT_C TInt | PointsFromTwips(TInt) |
IMPORT_C TInt | TwipsFromPoints(TInt) |
IMPORT_C TInt | TwipsFromPoints(const TDesC &) |
IMPORT_C TInt | TypefaceAttributes(const CGraphicsDevice &, const TDesC &) |
Provides static functions for getting information about the fonts supported by a graphics device.
IMPORT_C void | GetAvailableFontsL | ( | const CGraphicsDevice & | aDevice, |
CDesCArray & | aFontNameList, | |||
TInt | aFonts = EGulNoSymbolFonts | |||
) | [static] |
Gets the list of typeface names available for the graphics device.
Parameter | Description |
---|---|
aDevice | The graphics device. |
aFontNameList | On return, contains the list of typeface names. |
aFonts | Can be used to specify which sorts of typefaces are required. For possible values, see the flags defined in gulftflg.hrh beginning with EGulAllFonts. |
IMPORT_C TInt | GetAvailableHeightsInTwipsAndPointsL | ( | 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.
Parameter | Description |
---|---|
aDevice | The graphics device. |
aTypefaceName | The name of the typeface. |
aTwipsList | On return, contains all available heights for the typeface, in twips. |
aPointsList | On return, the heights in points, represented as character strings. |
Returns: KErrNotSupported if the named typeface is not supported by the graphics device, otherwise KErrNone.
IMPORT_C TInt | GetAvailableHeightsInTwipsL | ( | 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.
Parameter | Description |
---|---|
aDevice | The graphics device. |
aTypefaceName | The name of the typeface. |
aHeightList | On 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.
Gets the index into the supplied list of font heights of the closest match to the font height specified.
Parameter | Description |
---|---|
aTwipsList | The twips list. |
aHeight | The 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.
IMPORT_C TInt | TypefaceAttributes | ( | const CGraphicsDevice & | aDevice, |
const TDesC & | aTypefaceName | |||
) | [static] |
Gets the attributes of a named typeface, if supported by the graphics device.
Parameter | Description |
---|---|
aDevice | The graphics device. |
aTypefaceName | The 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.