Location: openfont.h
Link against: fntstr.lib
TOpenFontCharMetrics
Supported from 5.0
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 the Symbian platform.
Defined in TOpenFontCharMetrics
:
GetHorizBounds()
, GetTCharacterMetrics()
, GetVertBounds()
, Height()
, HorizAdvance()
, HorizBearingX()
, HorizBearingY()
, SetHeight()
, SetHorizAdvance()
, SetHorizBearingX()
, SetHorizBearingY()
, SetVertAdvance()
, SetVertBearingX()
, SetVertBearingY()
, SetWidth()
, TOpenFontCharMetrics()
, VertAdvance()
, VertBearingX()
, VertBearingY()
, Width()
TOpenFontCharMetrics();
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(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.
|
TBool GetTCharacterMetrics(TCharacterMetrics& aMetrics) const;
Converts a TCharacterMetrics
object to a TOpenFontCharacterMetrics
.
|
|
void GetHorizBounds(TRect& aBounds) const;
Supported from 6.0
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.
|
void GetVertBounds(TRect& aBounds) const;
Supported from 6.0
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.
|
TInt Height() const;
Gets the height of the character's bitmap.
|
TInt HorizAdvance() const;
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.
|
TInt HorizBearingX() const;
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.
|
TInt HorizBearingY() const;
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
|
TInt VertAdvance() const;
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 ER5.
|
TInt VertBearingY() const;
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.
|
TInt VertBearingX() const;
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.
|
TInt Width() const;
Gets the width of the character's bitmap.
|
void SetHeight(TInt aHeight);
Sets the height of the character's bitmap.
|
void SetHorizAdvance(TInt aHorizAdvance);
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.
|
void SetHorizBearingX(TInt aHorizBearingX);
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.
|
void SetHorizBearingY(TInt aHorizBearingY);
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.
|
void SetVertAdvance(TInt aVertAdvance);
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 ER5.
|
void SetVertBearingX(TInt aVertBearingX);
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.
|
void SetVertBearingY(TInt aVertBearingY);
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.
|
void SetWidth(TInt aWidth);
Sets the width of the character's bitmap.
|