#include <openfont.h>
class TOpenFontCharMetrics |
Public Member Enumerations | |
---|---|
enum | TUninitialized { EUninitialized } |
Public Member Functions | |
---|---|
TOpenFontCharMetrics() | |
TOpenFontCharMetrics(TUninitialized) | |
TOpenFontCharMetrics(const TCharacterMetrics &) | |
void | GetHorizBounds(TRect &) |
IMPORT_C TBool | GetTCharacterMetrics(TCharacterMetrics &) |
void | GetVertBounds(TRect &) |
IMPORT_C TGlyphBitmapType | GlyphType() |
TInt | Height() |
TInt | HorizAdvance() |
TInt | HorizBearingX() |
TInt | HorizBearingY() |
IMPORT_C void | SetGlyphType(TGlyphBitmapType) |
void | SetHeight(TInt) |
void | SetHorizAdvance(TInt) |
void | SetHorizBearingX(TInt) |
void | SetHorizBearingY(TInt) |
void | SetVertAdvance(TInt) |
void | SetVertBearingX(TInt) |
void | SetVertBearingY(TInt) |
void | SetWidth(TInt) |
TInt | VertAdvance() |
TInt | VertBearingX() |
TInt | VertBearingY() |
TInt | Width() |
Character metrics includes more information than TCharacterMetrics.
Character metrics allow characters to be placed horizontally or vertically. The character metrics encapsulated by this class are: Height, Width, Horizontal Bearing X, Horizontal Bearing Y, Horizontal Advance, Vertical Bearing X, Vertical Bearing Y, and Vertical Advance. Their meanings are described in the associated setter and getter functions.
Note :
Vertical drawing (in the sense of characters drawn with horizontal baselines, but in a vertical line) is not yet supported by Symbian OS.
See also: CFont::GetCharacterData() CFbsFont::GetCharacterData()
TOpenFontCharMetrics | ( | ) | [inline] |
Default constructor initializes all members to 0.
Default C++ constructor.
The constructor initialises all data members to zero. As for other T classes, there is no need to explicitly cleanup TOpenFontCharMetrics objects.
TOpenFontCharMetrics | ( | TUninitialized | ) | [inline] |
Constructor that does not initialize any members.
IMPORT_C | TOpenFontCharMetrics | ( | const TCharacterMetrics & | aMetrics | ) |
A constructor initialised with a TCharacterMetrics object.
This is the old-style character metrics object. As for other T classes, there is no need to explicitly cleanup TOpenFontCharMetrics objects.
Parameter | Description |
---|---|
aMetrics | The old-style metrics object. |
void | GetHorizBounds | ( | TRect & | aBounds | ) | const [inline] |
Gets the bounds of the character relative to its origin when setting text horizontally.
The origin here is the pen point before the character is drawn.
Parameter | Description |
---|---|
aBounds | The character's bounds. |
IMPORT_C TBool | GetTCharacterMetrics | ( | TCharacterMetrics & | aMetrics | ) | const |
Converts a TOpenFontCharacterMetrics object to a TCharacterMetrics.
Parameter | Description |
---|---|
aMetrics | On return, contains the character's old-style metrics. |
Returns: ETrue if it was possible to get the metrics, otherwise EFalse.
void | GetVertBounds | ( | TRect & | aBounds | ) | const [inline] |
Gets the bounds of the character relative to its origin when setting text vertically.
The origin here is the pen point before the character is drawn.
Parameter | Description |
---|---|
aBounds | The character's bounds. |
TInt | Height | ( | ) | const [inline] |
Gets the height of the character's bitmap.
Returns: The character's height in pixels.
TInt | HorizAdvance | ( | ) | const [inline] |
Gets the horizontal advance.
This is the amount added to the x co-ordinate of the origin after the character is drawn what most people understand by the width or escapement of a character. The origin here is the pen point before the character is drawn.
Returns: The horizontal advance in pixels
TInt | HorizBearingX | ( | ) | const [inline] |
Gets the horizontal bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing horizontally. A positive value means that the left edge of the bitmap is right of the origin.
Returns: The horizontal bearing X in pixels
TInt | HorizBearingY | ( | ) | const [inline] |
Gets horizontal bearing Y.
This is the vertical distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing horizontally. A positive value means that the top edge of the bitmap is above the origin
Returns: The horizontal bearing Y in pixels.
IMPORT_C void | SetGlyphType | ( | TGlyphBitmapType | ) |
Sets the glyph bitmap type.
Normally the bitmap type belongs to the font, but for linked fonts this can be different between different font elements making up the linked font.
Note: This is only of use in conjunction with rasterizer based linked fonts.
void | SetHeight | ( | TInt | aHeight | ) | [inline] |
Sets the height of the character's bitmap.
Parameter | Description |
---|---|
aHeight | The character height (in pixels). |
void | SetHorizAdvance | ( | TInt | aHorizAdvance | ) | [inline] |
Sets the horizontal advance.
This is the amount added to the x co-ordinate of the origin after the character is drawn, what most people understand by the width or escapement of a character. The origin here is the pen point before the character is drawn.
Parameter | Description |
---|---|
aHorizAdvance | The horizontal advance (in pixels). |
void | SetHorizBearingX | ( | TInt | aHorizBearingX | ) | [inline] |
Sets the horizontal bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing horizontally. A positive value means that the left edge of the bitmap is right of the origin.
Parameter | Description |
---|---|
aHorizBearingX | The horizontal bearing X (in pixels). |
void | SetHorizBearingY | ( | TInt | aHorizBearingY | ) | [inline] |
Sets the horizontal bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing horizontally. A positive value means that the top edge of the bitmap is above the origin.
Parameter | Description |
---|---|
aHorizBearingY | The horizontal bearing Y (in pixels). |
void | SetVertAdvance | ( | TInt | aVertAdvance | ) | [inline] |
Sets the vertical advance.
When drawing vertically, this is the amount added to the y co-ordinate of the origin after the character is drawn what most people understand by the height of a character. The origin here is the pen point before the character is drawn.
Note: Vertical drawing is not supported in v5.
Parameter | Description |
---|---|
aVertAdvance | The vertical advance (in pixels). |
void | SetVertBearingX | ( | TInt | aVertBearingX | ) | [inline] |
Set vertical bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing vertically. A positive value means that the left edge of the bitmap is right of the origin.
Parameter | Description |
---|---|
aVertBearingX | The vertical bearing X (in pixels). |
void | SetVertBearingY | ( | TInt | aVertBearingY | ) | [inline] |
Sets the vertical bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing vertically. A positive value means that the top edge of the bitmap is above the origin.
Parameter | Description |
---|---|
aVertBearingY | The vertical bearing Y (in pixels). |
void | SetWidth | ( | TInt | aWidth | ) | [inline] |
Sets the width of the character's bitmap.
Parameter | Description |
---|---|
aWidth | The width of the bitmap in pixels. |
TInt | VertAdvance | ( | ) | const [inline] |
Gets the vertical advance.
When drawing vertically, this is the amount added to the y co-ordinate of the origin after the character is drawn what most people understand by the height of a character. The origin here is the pen point before the character is drawn.
Note: Vertical drawing is not supported in v5.
Returns: The vertical advance in pixels.
TInt | VertBearingX | ( | ) | const [inline] |
Gets the vertical bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing vertically. A positive value means that the left edge of the bitmap is right of the origin.
Returns: The vertical bearing X in pixels.
TInt | VertBearingY | ( | ) | const [inline] |
Gets the vertical bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing vertically. A positive value means that the top edge of the bitmap is above the origin.
Returns: The vertical bearing Y in pixels.
TInt | Width | ( | ) | const [inline] |
Gets the width of the character's bitmap.
Returns: The width of the bitmap in pixels.