#include <GULUTIL.H>
Link against:
egul.lib
class FontUtils;
Description
Provides static functions for getting information about the fonts supported by a graphics device.
Members
Defined in FontUtils
:
GetAvailableFontsL(const CGraphicsDevice &,CDesCArray &,TInt)
Gets the list of typeface names available for the graphics device.
GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice &,const TDesC &,CArrayFix< TInt > &,CDesCArray &)
Gets a list of all heights in twips, available for the named typeface and the gr...
GetAvailableHeightsInTwipsL(const CGraphicsDevice &,const TDesC &,CArrayFix< TInt > &)
Gets a list of all heights in twips, available for the named typeface and the gr...
IndexOfNearestHeight(CArrayFix< TInt > &,TInt)
Gets the index into the supplied list of font heights of the closest match to th...
PointsFromTwips(TInt)
Converts a number of twips to points.
TwipsFromPoints(TInt)
Converts a number of points into twips.
TwipsFromPoints(const TDesC &)
Converts a number of points held as text to twips.
TypefaceAttributes(const CGraphicsDevice &,const TDesC &)
Gets the attributes of a named typeface, if supported by the graphics device.
Member functions
GetAvailableFontsL(const CGraphicsDevice &,CDesCArray &,TInt)
IMPORT_C static void GetAvailableFontsL(const CGraphicsDevice &aDevice, CDesCArray &aFontNameList, TInt aFonts=0x10);
Description
Gets the list of typeface names available for the graphics device.
Parameters
const CGraphicsDevice &aDevice |
The graphics device.
|
CDesC16Array &aFontNameList |
On return, contains the list of typeface names.
|
TInt 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.
|
|
TypefaceAttributes(const CGraphicsDevice &,const TDesC &)
IMPORT_C static TInt TypefaceAttributes(const CGraphicsDevice &aDevice, const TDesC &aTypefaceName);
Description
Gets the attributes of a named typeface, if supported by the graphics device.
Parameters
Return value
TInt
|
The typeface attributes. Attributes are zero if the typeface is not supported by the graphics device. Attribute values are
defined in TTypeface .
|
|
GetAvailableHeightsInTwipsL(const CGraphicsDevice &,const TDesC &,CArrayFix< TInt > &)
IMPORT_C static TInt GetAvailableHeightsInTwipsL(const CGraphicsDevice &aDevice, const TDesC &aTypefaceName, CArrayFix< TInt
> &aHeightList);
Description
Gets a list of all heights in twips, available for the named typeface and the graphics device specified.
Parameters
const CGraphicsDevice &aDevice |
The graphics device.
|
const TDesC16 &aTypefaceName |
The name of the typeface.
|
CArrayFix < TInt > &aHeightList |
On return, contains all available heights for the typeface, in twips.
|
|
Return value
TInt
|
KErrNotSupported if the named typeface is not supported by the graphics device, otherwise KErrNone.
|
|
GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice &,const TDesC &,CArrayFix< TInt > &,CDesCArray &)
IMPORT_C static TInt GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice &aDevice, const TDesC &aTypefaceName, CArrayFix<
TInt > &aTwipsList, CDesCArray &aPointsList);
Description
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.
Parameters
const CGraphicsDevice &aDevice |
The graphics device.
|
const TDesC16 &aTypefaceName |
The name of the typeface.
|
CArrayFix < TInt > &aTwipsList |
On return, contains all available heights for the typeface, in twips.
|
CDesC16Array &aPointsList |
On return, the heights in points, represented as character strings.
|
|
Return value
TInt
|
KErrNotSupported if the named typeface is not supported by the graphics device, otherwise KErrNone.
|
|
IMPORT_C static TInt PointsFromTwips(TInt aTwips);
Description
Converts a number of twips to points.
Parameters
TInt aTwips |
A number of twips.
|
|
Return value
IMPORT_C static TInt TwipsFromPoints(TInt aPoints);
Description
Converts a number of points into twips.
Parameters
TInt aPoints |
A number of points.
|
|
Return value
TwipsFromPoints(const TDesC &)
IMPORT_C static TInt TwipsFromPoints(const TDesC &aPoints);
Description
Converts a number of points held as text to twips.
Parameters
const TDesC16 &aPoints |
A number of points as text.
|
|
Return value
IndexOfNearestHeight(CArrayFix< TInt > &,TInt)
IMPORT_C static TInt IndexOfNearestHeight(CArrayFix< TInt > &aTwipsList, TInt aHeight);
Description
Gets the index into the supplied list of font heights of the closest match to the font height specified.
Parameters
Return value
TInt
|
The index into the list of the closest font height to aHeight.
|
|