CFbsFont Class Reference

#include <fbs.h>

Link against: fbscli.lib

class CFbsFont : public CFont

Inherits from

Protected Attributes
CBitmapFont *iAddressPointer
RFbsSession *iFbs
TInt iHandle
TInt iServerHandle
Public Member Functions
IMPORT_C TCharacterMetricsCharacterMetrics(TInt, const TUint8 *&)
IMPORT_C TBoolGetFaceAttrib(TOpenFontFaceAttrib &)
IMPORT_C TBoolGetFontMetrics(TOpenFontMetrics &)
IMPORT_C TIntHandle()
IMPORT_C TBoolHasCharacter(TInt)
IMPORT_C TBoolIsOpenFont()
IMPORT_C TIntRawTextWidthInPixels(const TDesC &)
IMPORT_C TIntTextWidthInPixels(const TDesC &)
IMPORT_C voidTextWidthInPixels(const TDesC &, SCharWidth &)
IMPORT_C TIntTextWidthInPixels(const TDesC &, const TMeasureTextInput *)
IMPORT_C voidTextWidthInPixels(const TDesC &, const TMeasureTextInput *, SCharWidth &)
Protected Member Functions
CFbsFont()
CFbsFont(const CFbsFont &)
~CFbsFont()
IMPORT_C CBitmapFont *Address()
IMPORT_C TIntDuplicate(TInt)
IMPORT_C voidReset()
Inherited Enumerations
CFont:TCharacterDataAvailability
CFont:TTextDirection
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CFont::AscentInPixels()const
CFont::BaselineOffsetInPixels()const
CFont::CharWidthInPixels(TChar)const
CFont::CharactersJoin(TInt,TInt)
CFont::DescentInPixels()const
CFont::DoGetCharacterPosition(TPositionParam &)const
CFont::ExtendedFunction(TUid,TAny *)const
CFont::FontCapitalAscent()const
CFont::FontLineGap()const
CFont::FontMaxAscent()const
CFont::FontMaxDescent()const
CFont::FontMaxHeight()const
CFont::FontSpecInTwips()const
CFont::FontStandardDescent()const
CFont::GetCharacterData(TUint,TOpenFontCharMetrics &,const TUint8 *&,TSize &)const
CFont::GetCharacterPosition(TPositionParam &)const
CFont::GetCharacterPosition2(TPositionParam &,RShapeInfo &)const
CFont::HeightInPixels()const
CFont::MaxCharWidthInPixels()const
CFont::MaxNormalCharWidthInPixels()const
CFont::MeasureText(const TDesC &,const TMeasureTextInput *,TMeasureTextOutput *)const
CFont::TextCount(const TDesC &,TInt)const
CFont::TextCount(const TDesC &,TInt,TInt &)const
CFont::TypeUid()const
CFont::WidthZeroInPixels()const
CFont::~CFont()

Detailed Description

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()

Member Attribute Documentation

iAddressPointer

CBitmapFont *iAddressPointer[protected]

iFbs

RFbsSession *iFbs[protected]

iHandle

TInt iHandle[protected]

iServerHandle

TInt iServerHandle[protected]

Constructor & Destructor Documentation

CFbsFont ( )

IMPORT_CCFbsFont()[protected]

CFbsFont ( const CFbsFont & )

IMPORT_CCFbsFont(const CFbsFont &aFont)[protected]

~CFbsFont ( )

IMPORT_C~CFbsFont()[protected]

Member Function Documentation

Address ( )

IMPORT_C CBitmapFont *Address()const [protected]

CharacterMetrics ( TInt, const TUint8 *& )

IMPORT_C TCharacterMetricsCharacterMetrics(TIntaCode,
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 DeprecatedTCharacterMetrics cannot store metrics larger than 127 or less than 127 use GetCharacterData() instead.

Parameters
aCodeThe code for the character to be checked.
aBytesOn return, contains a pointer to the compressed glyph bitmap.
Return Value
The character metrics for the font.

Duplicate ( TInt )

IMPORT_C TIntDuplicate(TIntaHandle)[protected]

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.

Parameters
aHandleThe handle to an existing CFbsFont.
Return Value
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.

GetFaceAttrib ( TOpenFontFaceAttrib & )

IMPORT_C TBoolGetFaceAttrib(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.

Parameters
aAttribOn return, contains the typeface attributes.
Return Value
EFalse if the attributes cannot be obtained, or if the font is not an Open Font (IsOpenFont() returns EFalse).

GetFontMetrics ( TOpenFontMetrics & )

IMPORT_C TBoolGetFontMetrics(TOpenFontMetrics &aMetrics)const

Gets the open font metrics. If the metrics cannot be obtained the function returns EFalse.

Parameters
aMetricsOn return, contains the font metrics
Return Value
EFalse if the metrics cannot be obtained

Handle ( )

IMPORT_C TIntHandle()const

Gets the Font and Bitmap server handle of the font.

Return Value
The handle of the font.

HasCharacter ( TInt )

IMPORT_C TBoolHasCharacter(TIntaCode)const

Tests whether the font contains a particular character.

Parameters
aCodeCharacter code to be tested. This code is in the code page 1252 encoding in v5, otherwise it is in Unicode
Return Value
ETrue if the font contains aCode.

IsOpenFont ( )

IMPORT_C TBoolIsOpenFont()const

Tests whether the font is an Open Font system font. Note: If this function returns ETrue, the function GetFaceAttrib() will work.

Return Value
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.

RawTextWidthInPixels ( const TDesC & )

IMPORT_C TIntRawTextWidthInPixels(const TDesC &aText)const

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

Parameters
aTextAny text descriptor (TPtrC, TPtr, _LIT, TBuf etc.).
Return Value
The width (in pixels) of the text in the descriptor.

Reset ( )

IMPORT_C voidReset()[protected]

TextWidthInPixels ( const TDesC & )

IMPORT_C TIntTextWidthInPixels(const TDesC &aText)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()

Parameters
aTextThe descriptor whose width should be determined.
Return Value
The width of the specified descriptor when displayed in this font, in pixels

TextWidthInPixels ( const TDesC &, SCharWidth & )

IMPORT_C voidTextWidthInPixels(const TDesC &aText,
SCharWidth &aCharWidth
)const

Gets the text width, move and adjusts of the specified descriptor when displayed in this font.

Parameters
aTextThe descriptor whose width should be determined.
aCharWidthThe width of the specified descriptor when displayed in this font, in pixels (including information on the width, move and adjusts of the descriptor).

TextWidthInPixels ( const TDesC &, const TMeasureTextInput * )

IMPORT_C TIntTextWidthInPixels(const TDesC &aText,
const TMeasureTextInput *aParam
)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()

Parameters
aTextThe descriptor whose width should be determined.
aParamParameter block that controls how much of aText is measured
Return Value
The width of the specified descriptor when displayed in this font, in pixels

TextWidthInPixels ( const TDesC &, const TMeasureTextInput *, SCharWidth & )

IMPORT_C voidTextWidthInPixels(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.

Parameters
aTextThe descriptor whose width should be determined.
aParamParameter block that controls how much of aText is measured
aCharWidthThe width of the specified descriptor when displayed in this font, in pixels (including information on the width, move and adjusts of the descriptor).