Location: openfont.h
Link against: fntstr.lib
TOpenFontGlyphData
Supported from 5.0
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()
static TOpenFontGlyphData* New(RHeap* aHeap,TInt aBufferSize);
Static constructor for a TOpenFontGlyphData
.
This constructor creates the object on a specified heap. It must be deleted using RHeap::Free()
.
|
|
TPtrC8 Bitmap() const;
Gets a constant pointer descriptor containing the bitmap this object represents.
|
const TUint8* BitmapPointer() const;
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.
|
TUint8* BufferEnd();
Gets a pointer to the end of the bitmap buffer.
|
TUint8* BufferStart();
Gets a pointer to the start of the bitmap buffer.
|
TInt BytesNeeded() const;
Gets the number of bytes needed to store the glyph bitmap.
|
TInt GlyphIndex() const;
Supported from 6.0
Gets the glyph index.
This is the index of a particular glyph within the font file.
Notes:
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 the Symbian platform.
|
const TOpenFontCharMetrics* Metrics() const;
Gets the character's metrics.
|
TBool Overflow() const;
Tests whether the bitmap buffer is large enough to hold the bitmap.
|
void SetBitmapPointer(const TUint8* aBitmap);
Sets the pointer to the bitmap buffer.
|
void SetBytesNeeded(TInt aBytes);
Sets the number of bytes needed to store the glyph bitmap.
|
void SetGlyphIndex(TInt aGlyphIndex);
Supported from 6.0
Sets the glyph index.
|
void SetMetrics(TOpenFontCharMetrics& aMetrics);
Sets the character's metrics, passing a reference to a TOpenFontCharMetrics
object.
|
void SetMetricsPointer(const TOpenFontCharMetrics* aMetrics);
Sets the character's metrics, passing a pointer to a TOpenFontCharMetrics
object.
|
void SetPointersToInternalBuffers();
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.