#include <gdi.h>
class TFontStyle |
Public Member Functions | |
---|---|
TFontStyle() | |
TFontStyle(TFontPosture, TFontStrokeWeight, TFontPrintPosition) | |
TGlyphBitmapType | BitmapType() |
IMPORT_C TUint32 | Effects() |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsEffectOn(FontEffect::TEffect) |
IMPORT_C TFontPosture | Posture() |
IMPORT_C TFontPrintPosition | PrintPosition() |
void | SetBitmapType(TGlyphBitmapType) |
IMPORT_C void | SetEffects(TUint32) |
IMPORT_C void | SetEffects(FontEffect::TEffect, TBool) |
IMPORT_C void | SetPosture(TFontPosture) |
IMPORT_C void | SetPrintPosition(TFontPrintPosition) |
IMPORT_C void | SetStrokeWeight(TFontStrokeWeight) |
IMPORT_C TFontStrokeWeight | StrokeWeight() |
IMPORT_C TBool | operator==(const TFontStyle &) |
Encapsulates a font style.
The font style information is comprised of:
the posture of the font upright or italic
the stroke weight of the font normal or bold
the print position of the font normal, subscript or superscript
Note that the underline and strike-through attributes are not included in this class, but are set in the graphics context.
See also: CGraphicsContext::SetUnderlineStyle() CGraphicsContext::SetStrikethroughStyle()
IMPORT_C | TFontStyle | ( | TFontPosture | aPost, |
TFontStrokeWeight | aStrWgt, | |||
TFontPrintPosition | aPrintPos | |||
) |
Constructs a TFontStyle object with the specified attributes.
Parameter | Description |
---|---|
aPost | The posture attribute. |
aStrWgt | The stroke weight attribute. |
aPrintPos | The print position attribute. |
TGlyphBitmapType | BitmapType | ( | ) | const [inline] |
Gets the anti-aliasing setting for the font, as set by SetBitmapType().
Returns: Indicates whether or not this font should be drawn using anti-aliasing.
IMPORT_C TUint32 | Effects | ( | ) | const |
Gets the font effects flags.
See also: TFontStyle::SetEffects()
Returns: The font effects flags.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises the font style to a write stream.
The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
Parameter | Description |
---|---|
aStream | The stream to which the font style is to be externalised. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises a font style from a read stream.
The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class.
Parameter | Description |
---|---|
aStream | The stream from which the font style is to be internalised |
IMPORT_C TBool | IsEffectOn | ( | FontEffect::TEffect | aEffect | ) | const |
Checks if a font effect is on.
See also: TFontStyle::SetEffects()
Parameter | Description |
---|---|
aEffect | The font effect to be checked. |
Returns: True represents the specified font effect is on, otherwise off.
IMPORT_C TFontPrintPosition | PrintPosition | ( | ) | const |
Gets the print position attribute.
Returns: The font style's print position.
void | SetBitmapType | ( | TGlyphBitmapType | aBitmapType | ) | [inline] |
Sets whether the font should be drawn using anti-aliasing. If set, this value overrides the default setting (set by CFbsTypefaceStore::SetDefaultBitmapType()) for this font.
Anti-aliasing can only be used for scalable fonts. There is currently no anti-aliasing support for bitmapped fonts.
Parameter | Description |
---|---|
aBitmapType | Indicates whether or not this font should be drawn using anti-aliasing. |
IMPORT_C void | SetEffects | ( | TUint32 | aEffects | ) |
Sets the font effects flags.
See also: TFontStyle::Effects()
IMPORT_C void | SetEffects | ( | FontEffect::TEffect | aEffect, |
TBool | aOn | |||
) |
Sets a font effect to the given state.
See also: TFontStyle::IsEffectOn()
Parameter | Description |
---|---|
aEffect | The font effect to be set. |
aOn | True represents on, otherwise off. |
IMPORT_C void | SetPosture | ( | TFontPosture | aPosture | ) |
Sets the posture attribute.
Parameter | Description |
---|---|
aPosture | The posture to be set. |
IMPORT_C void | SetPrintPosition | ( | TFontPrintPosition | aPrintPosition | ) |
Sets the print position attribute.
Parameter | Description |
---|---|
aPrintPosition | The print position to be set. |
IMPORT_C void | SetStrokeWeight | ( | TFontStrokeWeight | aStrokeWeight | ) |
Sets the stroke weight attribute.
Parameter | Description |
---|---|
aStrokeWeight | The stroke weight to be set. |
IMPORT_C TFontStrokeWeight | StrokeWeight | ( | ) | const |
Gets the stroke weight attribute.
Returns: The font style's stroke weight.
IMPORT_C TBool | operator== | ( | const TFontStyle & | aFontStyle | ) | const |
Compares a font style for equality.
Parameter | Description |
---|---|
aFontStyle | The font style to be compared with this font style. |
Returns: ETrue, if this TFontStyle is equal to aFontStyle, EFalse, otherwise.