Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TFontStyle Class Reference

Encapsulates a font style. More...

#include <gdi.h>

Public Member Functions

IMPORT_C TFontStyle ()
 Default C++ constructor.
 
IMPORT_C TFontStyle (TFontPosture aPost, TFontStrokeWeight aStrWgt, TFontPrintPosition aPrintPos)
 Constructs a TFontStyle object with the specified attributes.
 
IMPORT_C void InternalizeL (RReadStream &aStream)
 Internalises a font style from a read stream.
 
IMPORT_C void ExternalizeL (RWriteStream &aStream) const
 Externalises the font style to a write stream.
 
IMPORT_C TFontPosture Posture () const
 Gets the posture attribute.
 
IMPORT_C TFontStrokeWeight StrokeWeight () const
 Gets the stroke weight attribute.
 
IMPORT_C TFontPrintPosition PrintPosition () const
 Gets the print position attribute.
 
IMPORT_C void SetPosture (TFontPosture aPosture)
 Sets the posture attribute.
 
IMPORT_C void SetStrokeWeight (TFontStrokeWeight aStrokeWeight)
 Sets the stroke weight attribute.
 
IMPORT_C void SetPrintPosition (TFontPrintPosition aPrintPosition)
 Sets the print position attribute.
 
TGlyphBitmapType BitmapType () const
 Gets the anti-aliasing setting for the font, as set by SetBitmapType().
 
void SetBitmapType (TGlyphBitmapType aBitmapType)
 Sets whether the font should be drawn using anti-aliasing.
 
IMPORT_C TBool operator== (const TFontStyle &aFontStyle) const
 Compares a font style for equality.
 
IMPORT_C TUint32 Effects () const
 Gets the font effects flags.
 
IMPORT_C TBool IsEffectOn (FontEffect::TEffect aEffect) const
 Checks if a font effect is on.
 
IMPORT_C void SetEffects (TUint32 aEffects)
 Sets the font effects flags.
 
IMPORT_C void SetEffects (FontEffect::TEffect aEffect, TBool aOn)
 Sets a font effect to the given state.
 

Detailed Description

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()
API status
Published to all clients. Released API.

Definition at line 731 of file gdi.h.

Constructor & Destructor Documentation

◆ TFontStyle() [1/2]

IMPORT_C TFontStyle::TFontStyle ( )

Default C++ constructor.

(generated from Symbian Developer Library)

◆ TFontStyle() [2/2]

IMPORT_C TFontStyle::TFontStyle ( TFontPosture  aPost,
TFontStrokeWeight  aStrWgt,
TFontPrintPosition  aPrintPos 
)

Constructs a TFontStyle object with the specified attributes.

Parameters
aPostThe posture attribute.
aStrWgtThe stroke weight attribute.
aPrintPosThe print position attribute.

(generated from Symbian Developer Library)

Member Function Documentation

◆ BitmapType()

TGlyphBitmapType TFontStyle::BitmapType ( ) const
inline

Gets the anti-aliasing setting for the font, as set by SetBitmapType().

(generated from Symbian Developer Library)

◆ Effects()

IMPORT_C TUint32 TFontStyle::Effects ( ) const

Gets the font effects flags.

TFontStyle::SetEffects()

(generated from Symbian Developer Library)

◆ ExternalizeL()

IMPORT_C void TFontStyle::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.

Parameters
aStreamThe stream to which the font style is to be externalised.

Leave condition: KErrNoMemory This function may leave, if the write action causes the stream's resources to be exhausted.

(generated from Symbian Developer Library)

◆ InternalizeL()

IMPORT_C void TFontStyle::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.

Parameters
aStreamThe stream from which the font style is to be internalised

Leave condition: KErrNoMemory If there is a problem reading from the stream. If internalisation causes an out of memory error.

(generated from Symbian Developer Library)

◆ IsEffectOn()

IMPORT_C TBool TFontStyle::IsEffectOn ( FontEffect::TEffect  aEffect) const

Checks if a font effect is on.

TFontStyle::SetEffects()

Parameters
aEffectThe font effect to be checked.

(generated from Symbian Developer Library)

◆ operator==()

IMPORT_C TBool TFontStyle::operator== ( const TFontStyle &  aFontStyle) const

Compares a font style for equality.

Parameters
aFontStyleThe font style to be compared with this font style.

(generated from Symbian Developer Library)

◆ Posture()

IMPORT_C TFontPosture TFontStyle::Posture ( ) const

Gets the posture attribute.

(generated from Symbian Developer Library)

◆ PrintPosition()

IMPORT_C TFontPrintPosition TFontStyle::PrintPosition ( ) const

Gets the print position attribute.

(generated from Symbian Developer Library)

◆ SetBitmapType()

void TFontStyle::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.

Parameters
aBitmapTypeIndicates whether or not this font should be drawn using anti-aliasing.

(generated from Symbian Developer Library)

◆ SetEffects() [1/2]

IMPORT_C void TFontStyle::SetEffects ( FontEffect::TEffect  aEffect,
TBool  aOn 
)

Sets a font effect to the given state.

TFontStyle::IsEffectOn()

Parameters
aEffectThe font effect to be set.
aOnTrue represents on, otherwise off.

(generated from Symbian Developer Library)

◆ SetEffects() [2/2]

IMPORT_C void TFontStyle::SetEffects ( TUint32  aEffects)

Sets the font effects flags.

TFontStyle::Effects()

(generated from Symbian Developer Library)

◆ SetPosture()

IMPORT_C void TFontStyle::SetPosture ( TFontPosture  aPosture)

Sets the posture attribute.

Parameters
aPostureThe posture to be set.

(generated from Symbian Developer Library)

◆ SetPrintPosition()

IMPORT_C void TFontStyle::SetPrintPosition ( TFontPrintPosition  aPrintPosition)

Sets the print position attribute.

Parameters
aPrintPositionThe print position to be set.

(generated from Symbian Developer Library)

◆ SetStrokeWeight()

IMPORT_C void TFontStyle::SetStrokeWeight ( TFontStrokeWeight  aStrokeWeight)

Sets the stroke weight attribute.

Parameters
aStrokeWeightThe stroke weight to be set.

(generated from Symbian Developer Library)

◆ StrokeWeight()

IMPORT_C TFontStrokeWeight TFontStyle::StrokeWeight ( ) const

Gets the stroke weight attribute.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: