Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: gulfont.h
Link against: egul.lib

Class TLogicalFont

TLogicalFont

Support

Supported from 6.0

Description

Packages the attributes of a logical font.

These attributes include a UID (iFontId) and a category (iCategory), either of which can be used to identify a required system font. The possible values for the UID are defined in the UI variant's look and feel layer, so are not the same as the UID values that may be used to create a physical font.

An object of this class can be passed by any application to CEikonEnv::Font(), to return the closest matching system font (a CFont-derived object).

Defined in TLogicalFont:
EAnnotation, EBold, EBoldItalic, EButton, ECustom, EItalic, ELight, ENormal, ESubscript, ESuperscript, ETitle, EView, TFontCategory, TFontStyle, TLogicalFont(), iCategory, iFontId, iStyle, iZoomFactor


Construction


TLogicalFont()

TLogicalFont();

Description

The default constructor.

This initialises iFontId to KNullUid, iCategory to EView, iStyle to ENormal and iZoomFactor to a default zoom factor.


TLogicalFont()

TLogicalFont(TUid aId);

Description

Constructor with a logical font ID.

The other member data is initialised as for the default constructor.

Parameters

TUid aId

The logical font ID.


TLogicalFont()

TLogicalFont(TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor);

Description

Constructor with a logical font category, style and zoom factor.

iFontId is initialised to KNullUid.

Parameters

TFontCategory aCategory

The logical font category.

TFontStyle aStyle

The font style.

const TZoomFactor& aZoomFactor

The zoom factor.


TLogicalFont()

TLogicalFont(TUid aId, TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor);

Description

Constructs a logical font, specifying its logical font ID, logical font category, style and zoom factor.

Parameters

TUid aId

The logical font ID.

TFontCategory aCategory

The logical font category.

TFontStyle aStyle

The font style.

const TZoomFactor& aZoomFactor

The zoom factor.

[Top]


Font attributes


iFontId

TUid iFontId;

Description

The logical font ID.


iCategory

TFontCategory iCategory;

Description

The logical font category.


iStyle

TFontStyle iStyle;

Description

The font style.


iZoomFactor

TZoomFactor iZoomFactor;

Description

The zoom factor.

[Top]


Enumerations


Enum TFontCategory

TFontCategory

Description

Enumerates the logical font categories.

The font category specifies the type of font that is required. It can be specified as an alternative to the logical font UID. The physical fonts associated with these categories are specified in the LAF layer, so are UI variant-specific.

EView

The normal system font.

EButton

The font used in buttons.

EAnnotation

The font used for annotations. This is smaller than the normal font. It is used to draw the page number in some applications, for instance.

ETitle

The font used for titles.


Enum TFontStyle

TFontStyle

Description

Enumerates the font styles.

ENormal

Normal style.

EBold

Bold.

EItalic

Italics.

EBoldItalic

Bold and italics.

ESuperscript

Superscript.

ESubscript

Subscript.

ELight

Light. This is the opposite of bold, i.e. a smaller than normal pen size is used to draw it.

ECustom

Custom font.