Location:
OPENFONT.H
Link against: fntstr.lib
class TOpenFontCharMetrics;
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.
Defined in TOpenFontCharMetrics
:
EUninitialized
, GetHorizBounds()
, GetTCharacterMetrics()
, GetVertBounds()
, Height()
, HorizAdvance()
, HorizBearingX()
, HorizBearingY()
, SetHeight()
, SetHorizAdvance()
, SetHorizBearingX()
, SetHorizBearingY()
, SetVertAdvance()
, SetVertBearingX()
, SetVertBearingY()
, SetWidth()
, TOpenFontCharMetrics()
, TOpenFontCharMetrics()
, TOpenFontCharMetrics()
, TUninitialized
, VertAdvance()
, VertBearingX()
, VertBearingY()
, Width()
inline TOpenFontCharMetrics(TUninitialized);
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.
|
IMPORT_C TBool GetTCharacterMetrics(TCharacterMetrics &aMetrics) const;
Converts a TCharacterMetrics
object to a TOpenFontCharacterMetrics.
|
|
inline TInt Width() const;
Gets the width of the character's bitmap.
|
inline TInt Height() const;
Gets the height of the character's bitmap.
|
inline 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.
|
inline 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
|
inline 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.
|
inline 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.
|
inline 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.
|
inline 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 v5.
|
inline void GetHorizBounds(TRect &aBounds) const;
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.
|
inline void GetVertBounds(TRect &aBounds) const;
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.
|
inline void SetWidth(TInt aWidth);
Sets the width of the character's bitmap.
|
inline void SetHeight(TInt aHeight);
Sets the height of the character's bitmap.
|
inline 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.
|
inline 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.
|
inline 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.
|
inline 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.
|
inline 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.
|
inline 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 v5.
|