Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: openfont.h
Link against: fntstr.lib

Class TOpenFontGlyphData

TOpenFontGlyphData

Support

Supported from 5.0

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

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

See also:


Construction and destruction


New()

static 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.

[Top]


Member functions


Bitmap()

TPtrC8 Bitmap() const;

Description

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

Return value

TPtrC8

Pointer descriptor for the glyph.


BitmapPointer()

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

TUint8*

A pointer to the bitmap.


BufferEnd()

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.


BufferStart()

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.


BytesNeeded()

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:


GlyphIndex()

TInt GlyphIndex() const;

Support

Supported from 6.0

Description

Gets the glyph index.

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

Notes:

Return value

TInt

The glyph index.

See also:


Metrics()

const TOpenFontCharMetrics* Metrics() const;

Description

Gets the character's metrics.

Return value

TOpenFontCharMetrics*

The character's open font metrics.


Overflow()

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.


SetBitmapPointer()

void SetBitmapPointer(const TUint8* aBitmap);

Description

Sets the pointer to the bitmap buffer.

Parameters

const TUint8* aBitmap

The pointer to the bitmap buffer.


SetBytesNeeded()

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:


SetGlyphIndex()

void SetGlyphIndex(TInt aGlyphIndex);

Support

Supported from 6.0

Description

Sets the glyph index.

Parameters

TInt aGlyphIndex

The glyph index.


SetMetrics()

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.


SetMetricsPointer()

void SetMetricsPointer(const TOpenFontCharMetrics* aMetrics);

Description

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

Parameters

const TOpenFontCharMetrics* aMetrics


SetPointersToInternalBuffers()

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.