#include <fbs.h>
| class CFbsFont : public CFont | 
| Protected Attributes | |
|---|---|
| CBitmapFont * | iAddressPointer | 
| RFbsSession * | iFbs | 
| TInt | iHandle | 
| TInt | iServerHandle | 
| Public Member Functions | |
|---|---|
| IMPORT_C TCharacterMetrics | CharacterMetrics(TInt, const TUint8 *&) | 
| IMPORT_C TBool | GetFaceAttrib(TOpenFontFaceAttrib &) | 
| IMPORT_C TBool | GetFontMetrics(TOpenFontMetrics &) | 
| IMPORT_C TInt | Handle() | 
| IMPORT_C TBool | HasCharacter(TInt) | 
| IMPORT_C TBool | IsOpenFont() | 
| IMPORT_C TInt | RawTextWidthInPixels(const TDesC &) | 
| IMPORT_C TInt | TextWidthInPixels(const TDesC &) | 
| IMPORT_C void | TextWidthInPixels(const TDesC &, SCharWidth &) | 
| IMPORT_C TInt | TextWidthInPixels(const TDesC &, const TMeasureTextInput *) | 
| IMPORT_C void | TextWidthInPixels(const TDesC &, const TMeasureTextInput *, SCharWidth &) | 
| Protected Member Functions | |
|---|---|
| CFbsFont() | |
| CFbsFont(const CFbsFont &) | |
| ~CFbsFont() | |
| IMPORT_C CBitmapFont * | Address() | 
| IMPORT_C TInt | Duplicate(TInt) | 
| IMPORT_C void | Reset() | 
| Inherited Enumerations | |
|---|---|
| CFont:TCharacterDataAvailability | |
| CFont:TTextDirection | |
Font managed by the font and bitmap server. CFbsFont objects are used for screen and off-screen bitmap fonts. They are usually obtained by calls to the CBitmapDevice::GetNearestFontInPixels() and MGraphicsDeviceMap::GetNearestFontInTwips() functions. The class implements a number of functions inherited from CFont.
See also: CBitmapDevice::GetNearestFontInPixels() MGraphicsDeviceMap::GetNearestFontInTwips()
| IMPORT_C TCharacterMetrics | CharacterMetrics | ( | TInt | aCode, | 
| const TUint8 *& | aBytes | |||
| ) | const | |||
Gets the character metrics and a pointer to the compressed glyph bitmap for the specified character. This function is deprecated, because TCharacterMetrics cannot store metrics larger than 127 or less than 127 use GetCharacterData() instead. Deprecated
| Parameter | Description | 
|---|---|
| aCode | The code for the character to be checked. | 
| aBytes | On return, contains a pointer to the compressed glyph bitmap. | 
Returns: The character metrics for the font.
Duplicates a font. This function does not create a copy of the font. It just assigns another handle to the bitmap in the font and bitmap server, and sets this object's handle to that.
| Parameter | Description | 
|---|---|
| aHandle | The handle to an existing CFbsFont. | 
Returns: KErrNone if successful; KErrCouldNotConnect if no connection to the font and bitmap server could be made; KErrUnknown if no font could be found with the specified handle number.
| IMPORT_C TBool | GetFaceAttrib | ( | TOpenFontFaceAttrib & | aAttrib | ) | const | 
Gets the typeface attributes of Open Font System fonts. Notes: Typeface attributes are different from the font metrics; they are not metrics, which are different for every different size, but size-independent attributes of the typeface, like name and style. This function can be used if IsOpenFont() returns true i.e. the font is an Open Font.
| Parameter | Description | 
|---|---|
| aAttrib | On return, contains the typeface attributes. | 
Returns: EFalse if the attributes cannot be obtained, or if the font is not an Open Font (IsOpenFont() returns EFalse).
| IMPORT_C TBool | GetFontMetrics | ( | TOpenFontMetrics & | aMetrics | ) | const | 
Gets the open font metrics. If the metrics cannot be obtained the function returns EFalse.
| Parameter | Description | 
|---|---|
| aMetrics | On return, contains the font metrics | 
Returns: EFalse if the metrics cannot be obtained
| IMPORT_C TInt | Handle | ( | ) | const | 
Gets the Font and Bitmap server handle of the font.
Returns: The handle of the font.
| IMPORT_C TBool | IsOpenFont | ( | ) | const | 
Tests whether the font is an Open Font system font. Note: If this function returns ETrue, the function GetFaceAttrib() will work.
Returns: ETrue if font is an Open Font system font (e.g. TrueType). EFalse if the font is a bitmap font loaded from a GDR file.
Gets the raw width of the text in the descriptor, in pixels. DEPRECATED: Same as MeasureText(const TDesC&). This is the width of the text without adjusting for side bearings, algorithmic style etc. Deprecated
| Parameter | Description | 
|---|---|
| aText | Any text descriptor (TPtrC, TPtr, _LIT, TBuf etc.). | 
Returns: The width (in pixels) of the text in the descriptor.
Reimplemented from CFont::TextWidthInPixels(const TDesC &)const
Gets the width of the specified descriptor when displayed in this font, in pixels. Override of the base class to resolve name clash with other TextWidthInPixels variant.
See also: CFont::TextWidthInPixels()
| Parameter | Description | 
|---|---|
| aText | The descriptor whose width should be determined. | 
Returns: The width of the specified descriptor when displayed in this font, in pixels
| IMPORT_C void | TextWidthInPixels | ( | const TDesC & | aText, | 
| SCharWidth & | aCharWidth | |||
| ) | const | |||
Gets the text width, move and adjusts of the specified descriptor when displayed in this font.
| Parameter | Description | 
|---|---|
| aText | The descriptor whose width should be determined. | 
| aCharWidth | The width of the specified descriptor when displayed in this font, in pixels (including information on the width, move and adjusts of the descriptor). | 
| IMPORT_C TInt | TextWidthInPixels | ( | const TDesC & | aText, | 
| const TMeasureTextInput * | aParam | |||
| ) | const | |||
Reimplemented from CFont::TextWidthInPixels(const TDesC &,const TMeasureTextInput *)const
Gets the width of the specified descriptor when displayed in this font, in pixels. Override of the base class to resolve name clash with other TextWidthInPixels variant.
See also: CFont::TextWidthInPixels()
| Parameter | Description | 
|---|---|
| aText | The descriptor whose width should be determined. | 
| aParam | Parameter block that controls how much of aText is measured | 
Returns: The width of the specified descriptor when displayed in this font, in pixels
| IMPORT_C void | TextWidthInPixels | ( | const TDesC & | aText, | 
| const TMeasureTextInput * | aParam, | |||
| SCharWidth & | aCharWidth | |||
| ) | const | |||
Gets the text width, move and adjusts of the specified descriptor when displayed in this font.
| Parameter | Description | 
|---|---|
| aText | The descriptor whose width should be determined. | 
| aParam | Parameter block that controls how much of aText is measured | 
| aCharWidth | The width of the specified descriptor when displayed in this font, in pixels (including information on the width, move and adjusts of the descriptor). |