CBitmapFont Class Reference

#include <fntstore.h>

Link against: fntstr.lib

class CBitmapFont : public CFont

Inherits from

  • CBitmapFont
    Public Attributes
    TAlgStyle iAlgStyle
    Public Member Functions
    IMPORT_C TIntBitmapEncoding()
    IMPORT_C TCharacterMetricsCharacterMetrics(TInt, const TUint8 *&)
    IMPORT_C TBoolCharacterNeedsToBeRasterized(TInt, TInt)
    IMPORT_C voidDeleteShape(TInt, TShapeHeader *)
    IMPORT_C TBoolGetCharacterData(TInt, TInt, TOpenFontCharMetrics &, const TUint8 *&)
    IMPORT_C TBoolGetFaceAttrib(TOpenFontFaceAttrib &)
    IMPORT_C voidGetFontMetrics(TOpenFontMetrics &)
    TGlyphBitmapType GlyphBitmapType()
    IMPORT_C TBoolHasCharacterL(TInt)
    TBool IsOpenFont()
    COpenFont *OpenFont()
    IMPORT_C TBoolRasterize(TInt, TInt, TOpenFontGlyphData *)
    IMPORT_C TShapeHeader *ShapeTextL(const TDesC16 &, TInt, const TShapeMessageParameters &)
    TUid Uid()
    IMPORT_C TUint32UniqueFontId()
    IMPORT_C voidoperator delete(TAny *)
    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::DoGetCharacterData(TUint,TOpenFontCharMetrics &,const TUint8 *&,TSize &)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::TextWidthInPixels(const TDesC &)const
    CFont::TextWidthInPixels(const TDesC &,const TMeasureTextInput *)const
    CFont::TypeUid()const
    CFont::WidthZeroInPixels()const
    CFont::~CFont()

    Detailed Description

    Bitmap font class. An object of this class may either access and use a bitmap font (a CFontBitmap) or an open font (a COpenFont). Stored in a CFontStore.

    Member Attribute Documentation

    iAlgStyle

    TAlgStyle iAlgStyle

    The algorithmic font style.

    Member Function Documentation

    BitmapEncoding ( )

    IMPORT_C TIntBitmapEncoding()const

    Gets encoding if a bitmap font (a CFontBitmap) is used.

    Returns: Bitmap encoding value.

    CharacterMetrics ( TInt, const TUint8 *& )

    IMPORT_C TCharacterMetricsCharacterMetrics(TIntaCode,
    const TUint8 *&aBytes
    )const

    Gets a pointer to a bitmap and the metrics for a specified character, but only if a CFontBitmap is being used by the bitmap font object.

    This function does not work when a COpenFont is being used, but GetCharacterData() can be used instead.

    If the specified character does not exist in the font then the bitmap pointer and character metrics are gotten for a replacement character, KReplacementCharacter.

    ParameterDescription
    aCodeA character code.
    aBytesOn return, a pointer to the bitmap for the specified character.

    Returns: Metrics for the specified character.

    CharacterNeedsToBeRasterized ( TInt, TInt )

    IMPORT_C TBoolCharacterNeedsToBeRasterized(TIntaSessionHandle,
    TIntaCode
    )const

    Gets whether the specified character needs to be rasterised.

    False is returned if it is a bitmap font (a CFontBitmap) being used by the bitmap font object (so no rasterization is required) or if is an open font (a COpenFont) and the character has been rasterized.

    ParameterDescription
    aSessionHandleA session handle for the open font system.
    aCodeA character code.

    Returns: ETrue if the character needs to be rasterized; otherwise EFalse.

    DeleteShape ( TInt, TShapeHeader * )

    IMPORT_C voidDeleteShape(TIntaSessionHandle,
    TShapeHeader *aHeader
    )

    Frees the memory taken up as a result of shaping

    GetCharacterData ( TInt, TInt, TOpenFontCharMetrics &, const TUint8 *& )

    IMPORT_C TBoolGetCharacterData(TIntaSessionHandle,
    TIntaCode,
    TOpenFontCharMetrics &aMetrics,
    const TUint8 *&aBitmap
    )const

    Gets a pointer to a bitmap and the metrics for a specified character.

    Note that this function calls CharacterMetrics() if a CFontBitmap is being used by the bitmap font object, and maps the TCharacterMetrics values returned by that function to aMetrics.

    If the function fails to get the bitmap and metric values (because the character is in an open font and has not yet been rasterized) returns EFalse.

    ParameterDescription
    aSessionHandleA session handle for the open font system.
    aCodeA character code.
    aMetricsOn return, metrics for the specified character.
    aBitmapOn return, a pointer to the bitmap for the specified character.

    Returns: ETrue if successful, otherwise EFalse.

    GetFaceAttrib ( TOpenFontFaceAttrib & )

    IMPORT_C TBoolGetFaceAttrib(TOpenFontFaceAttrib &aAttrib)const

    Gets the open font typeface attributes if possible.

    At present no attempt is made to sythesize these attributes for bitmap fonts (CFontBitmaps).

    ParameterDescription
    aAttribOn return, the open font typeface attributes.

    Returns: ETrue if successful; EFalse if not possible to get the open font typeface attributes.

    GetFontMetrics ( TOpenFontMetrics & )

    IMPORT_C voidGetFontMetrics(TOpenFontMetrics &aMetrics)const

    Gets the open font metrics.

    These metrics distinguish between maximum character height and depth and typographic ascent and descent, so that the clipping rectangle for text can be distinguished from the distance to neighbouring baselines.

    ParameterDescription
    aMetricsOpen font metrics.

    GlyphBitmapType ( )

    TGlyphBitmapType GlyphBitmapType()const [inline]

    Gets the anti-aliasing setting for the font, see TGlyphBitmapType for the range of values.

    This is only applicable to open fonts (COpenFonts) not bitmap fonts (CBitmapFonts).

    Note that this setting is stored in the device-independent font specification which is set when the bitmap font object is constructed.

    See also: IsOpenFont() TGlyphBitmapType COpenFont CBitmapFont

    Returns: The anti-aliasing setting for the font.

    HasCharacterL ( TInt )

    IMPORT_C TBoolHasCharacterL(TIntaCode)const

    Gets whether the open or bitmap font has the specified character.

    ParameterDescription
    aCodeA character code.

    Returns: ETrue if the font has the specified character; otherwise EFalse.

    IsOpenFont ( )

    TBool IsOpenFont()const [inline]

    Returns whether the bitmap font object is an open font (a COpenFont) rather than a bitmap font (a CFontBitmap).

    See also: OpenFont()

    Returns: ETrue if the bitmap font object is using an open font (a COpenFont); EFalse if it is using a bitmap font (a CFontBitmap).

    OpenFont ( )

    COpenFont *OpenFont()const [inline]

    Returns a pointer to the open font being used by the bitmap font object.

    See also: IsOpenFont()

    Returns: A pointer to an open font.

    Rasterize ( TInt, TInt, TOpenFontGlyphData * )

    IMPORT_C TBoolRasterize(TIntaSessionHandle,
    TIntaCode,
    TOpenFontGlyphData *aGlyphData
    )const

    Attempts to rasterize a character (aCode) into a data area (aGlyphData) in shared memory.

    This works only for open fonts: where the bitmap font object is using a COpenFont.

    Bitmap fonts are deemed to be fully rasterized after they have been loaded from file.

    Returns ETrue if the character was successfully rasterized or was already in the cache. This function can be called only by the server; rasterization uses memory and other resources (e.g., file handles) owned by the server.

    ParameterDescription
    aSessionHandleA session handle for the open font system.
    aCodeA character code.
    aGlyphDataA data area in shared memory.

    Returns: ETrue if the character was successfully rasterized or was already in the cache; otherwise EFalse.

    ShapeTextL ( const TDesC16 &, TInt, const TShapeMessageParameters & )

    IMPORT_C TShapeHeader *ShapeTextL(const TDesC16 &aText,
    TIntaSessionHandle,
    const TShapeMessageParameters &aParams
    )

    Turns text into glyph codes and positions.

    ParameterDescription
    aTextThe Unicode text to shape plus context

    Returns: The output shape header from the per-font cache, or 0 on failure.

    Uid ( )

    TUid Uid()const

    Returns a font identifier.

    If it uses an open font the UID returned has a value of zero. Otherwise it has the UID value of the CFontBitmap it uses.

    Returns: A font identifier.

    UniqueFontId ( )

    IMPORT_C TUint32UniqueFontId()

    operator delete ( TAny * )

    IMPORT_C voidoperator delete(TAny *)