![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
CBase |
Abstract: CBase behaviour |
CFont |
Abstract: provides abstract font interface |
Font managed by font and bitmap server |
fbs.h
fbscli.lib
CFbsFont is a CFont-derived class, for screen and off-screen bitmap fonts. This section defines the functions added to the class, in EPOC Release 5, to support the open font system.
To view the existing class documentation see CFbsFont in the C++ SDK.
TCharacterMetrics CharacterMetrics(TInt aCode,TUint8*& aBytes) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Returns the character metrics for aCode and puts a pointer to the compressed glyph bitmap in aBytes. This function is now deprecated because TCharacterMetrics cannot store metrics larger than 127 or less than 127 - use GetCharacterData() instead.
TInt aCode |
The code for the character to be checked |
TUint8*& aBytes |
a pointer to the compressed glyph bitmap is placed in aBytes |
TCharacterMetrics |
The character metrics for the font (eg Offset, ascent, height, adjust etc.) |
TInt RawTextWidthInPixels(const TDesC& aText) const
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves the text width, in pixels, without adjusting for side bearings, algorithmic style etc.
const TDesC& aText |
Any text descriptor (TPtrC, TPtr, _LIT, TBuf etc.) |
TInt |
The width (in pixels) of the text in the descriptor |
TBool GetCharacterData(TInt aCode,TOpenFontCharMetrics& aMetrics,const TUint8*& aBytes) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves the character metrics and the glyph bitmap.
This function works for both bitmap fonts and those handled by the Open Font System. It is better than CharacterMetrics() because TOpenFontCharMetrics can handle 16-bit metrics, and contains more information.
TInt aCode |
The character code (in code page 1252 for the non-Unicode build, otherwise in Unicode). |
TOpenFontCharMetrics& aMetrics |
The character metrics |
const TUint8*& aBytes |
a pointer to the compressed glyph bitmap is placed in aBytes |
TBool |
False if metrics cannot be obtained |
TBool GetFontMetrics(TOpenFontMetrics& aMetrics) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves the font metrics if possible.
TOpenFontMetrics& aMetrics |
The font metrics |
TBool |
False if the metrics cannot be obtained |
TBool GetFaceAttrib(TOpenFontFaceAttrib& aAttrib) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Returns the typeface attributes if the font is an Open Font (that is, if IsOpenFont returns TRUE see below).
Note: 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.
TOpenFontFaceAttrib& aAttrib |
Typeface attributes |
TBool |
Returns FALSE if attributes cannot be obtained, and if the IsOpenFont() function is FALSE (not an Open Font) |
TBool IsOpenFont() const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Returns TRUE if the font was created by the Open Font System (e.g., a TrueType font). The function returns FALSE if the font is a bitmap font loaded from a GDR file.
Note: If IsOpenFont() returns TRUE, the function GetFaceAttrib() will work.
TBool |
True if font was created by the Open Font system eg a TrueType font. |
TBool HasCharacter(TInt aCode) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Returns TRUE if the font contains the character aCode. This code is in the code page 1252 encoding in the narrow build, otherwise it is in Unicode
TInt aCode |
Character code to be checked |
TBool |
TRUE if the font contains aCode. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |