Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: OPENFONT.H
Link against: fntstr.lib

Class TOpenFontGlyphData

class TOpenFontGlyphData;

Description

Font glyph data.

Objects of this type are used by rasterizers to supply glyph data to font and bitmap server clients. Unless you are writing a rasterizer you will not need to use an object of this type.

The object cannot be constructed and destroyed by normal means. It resides on a specified heap. It is created by New() and deleted by RHeap::Free().

Members

Defined in TOpenFontGlyphData:
Bitmap(), BitmapPointer(), BufferEnd(), BufferStart(), BytesNeeded(), GlyphIndex(), Metrics(), New(), Overflow(), SetBitmapPointer(), SetBytesNeeded(), SetGlyphIndex(), SetMetrics(), SetMetricsPointer(), SetPointersToInternalBuffers()

See also:


Member functions


New()

static IMPORT_C TOpenFontGlyphData *New(RHeap *aHeap, TInt aBufferSize);

Description

Static constructor for a TOpenFontGlyphData.

This constructor creates the object on a specified heap. It must be deleted using RHeap::Free().

Parameters

RHeap *aHeap

The shared heap on which the object is constructed.

TInt aBufferSize

The amount of memory allocated for the glyph data.

Return value

TOpenFontGlyphData *

A pointer to the newly created object.


Overflow()

inline TBool Overflow() const;

Description

Tests whether the bitmap buffer is large enough to hold the bitmap.

Return value

TBool

ETrue if the bitmap will overflow its buffer, otherwise EFalse.


BytesNeeded()

inline TInt BytesNeeded() const;

Description

Gets the number of bytes needed to store the glyph bitmap.

Return value

TInt

The number of bytes needed to store the glyph bitmap.

See also:


Bitmap()

inline TPtrC8 Bitmap() const;

Description

Gets a constant pointer descriptor containing the bitmap this object represents.

Return value

TPtrC8

Pointer descriptor for the glyph.


BitmapPointer()

inline const TUint8 *BitmapPointer() const;

Description

Gets a pointer to the bitmap.

This points either to the buffer used to write the bitmap when it is first rasterized, or to the cache if the character was already rasterized.

Return value

const TUint8 *

A pointer to the bitmap.


Metrics()

inline const TOpenFontCharMetrics *Metrics() const;

Description

Gets the character's metrics.

Return value

const TOpenFontCharMetrics *

The character's open font metrics.


GlyphIndex()

inline TInt GlyphIndex() const;

Description

Gets the glyph index.

This is the index of a particular glyph within the font file.

Note: This makes it possible to gain access to glyphs which are not referenced by the Unicode character set. However, this feature is not yet supported by Symbian OS.

Return value

TInt

The glyph index.

See also:


BufferStart()

inline TUint8 *BufferStart();

Description

Gets a pointer to the start of the bitmap buffer.

Return value

TUint8 *

A pointer to the start of the bitmap buffer.


BufferEnd()

inline TUint8 *BufferEnd();

Description

Gets a pointer to the end of the bitmap buffer.

Return value

TUint8 *

A pointer to the end of the bitmap buffer.


SetBytesNeeded()

inline void SetBytesNeeded(TInt aBytes);

Description

Sets the number of bytes needed to store the glyph bitmap.

Parameters

TInt aBytes

The number of bytes needed to store the glyph bitmap.

See also:


SetBitmapPointer()

inline void SetBitmapPointer(const TUint8 *aBitmap);

Description

Sets the pointer to the bitmap buffer.

Parameters

const TUint8 *aBitmap

The pointer to the bitmap buffer.


SetMetricsPointer()

inline void SetMetricsPointer(const TOpenFontCharMetrics *aMetrics);

Description

Sets the character's metrics, passing a pointer to a TOpenFontCharMetrics object.

Parameters

const TOpenFontCharMetrics *aMetrics

A pointer to the character's open font character metrics.


SetPointersToInternalBuffers()

inline void SetPointersToInternalBuffers();

Description

Sets the bitmap and metrics pointers to point to the internal buffers.

The alternative is that the pointers point to the cache of metrics and bitmaps that have already been rasterized.


SetMetrics()

inline void SetMetrics(TOpenFontCharMetrics &aMetrics);

Description

Sets the character's metrics, passing a reference to a TOpenFontCharMetrics object.

Parameters

TOpenFontCharMetrics &aMetrics

The character's open font character metrics.


SetGlyphIndex()

inline void SetGlyphIndex(TInt aGlyphIndex);

Description

Sets the glyph index.

Parameters

TInt aGlyphIndex

The glyph index.