TTypeface Class Reference
Typeface name and attributes.
This class identifies a typeface by name, and contains the combination of attributes of the typeface. These attributes define whether it is a symbol typeface, whether the typeface is proportional, and whether it is serif or sans-serif.
The combination of attributes for a typeface are stored in a bitmask, with the various bits indicating different attributes. The bitmask is calculated for any particular attribute combination by ORing the enumerated value for each individual attribute.
Constructor & Destructor Documentation
Member Functions Documentation
Attributes()
IMPORT_C
TInt
|
Attributes
|
(
|
)
|
const
|
Gets the combination of attributes of the typeface.
ExternalizeL(RWriteStream &)
Externalises a typeface 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
RWriteStream
& aStream
|
The stream to which the typeface is to be externalised.
|
InternalizeL(RReadStream &)
Internalises a typeface 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
RReadStream
& aStream
|
Stream from which the typeface is to be internalised.
|
IsProportional()
IMPORT_C
TBool
|
IsProportional
|
(
|
)
|
const
|
Gets the typeface's proportional attribute.
IsSerif()
IMPORT_C
TBool
|
IsSerif
|
(
|
)
|
const
|
Gets the typeface's serif attribute.
IsSymbol()
IMPORT_C
TBool
|
IsSymbol
|
(
|
)
|
const
|
Gets the typeface's symbol attribute.
Name()
IMPORT_C const
TDesC
&
|
Name
|
(
|
)
|
const
|
Returns the name of the typeface.
ResetAttributes()
void
|
ResetAttributes
|
(
|
)
|
[private]
|
ResetScriptType()
void
|
ResetScriptType
|
(
|
)
|
[private]
|
ScriptTypeForMetrics()
IMPORT_C
TInt
|
ScriptTypeForMetrics
|
(
|
)
|
const
|
Gets the script with which font metrics calculation will be based on.
SetAttributes(TInt)
IMPORT_C void
|
SetAttributes
|
(
|
TInt
|
aAttributes
|
)
|
|
Set the combination of attributes for this typeface.
Parameters
TInt
aAttributes
|
A bitmap defining the combination of attributes.
|
SetIsProportional(TBool)
IMPORT_C void
|
SetIsProportional
|
(
|
TBool
|
aIsProportional
|
)
|
|
Sets the typeface's proportional attribute.
Parameters
TBool
aIsProportional
|
ETrue if the typeface is a proportional typeface, otherwise EFalse.
|
SetIsSerif(TBool)
IMPORT_C void
|
SetIsSerif
|
(
|
TBool
|
aIsSerif
|
)
|
|
Sets the typeface's serif attribute.
Parameters
TBool
aIsSerif
|
ETrue if the typeface is a serif typeface, otherwise EFalse.
|
SetIsSymbol(TBool)
IMPORT_C void
|
SetIsSymbol
|
(
|
TBool
|
aIsSymbol
|
)
|
|
Sets the typeface's symbol attribute.
Parameters
TBool
aIsSymbol
|
ETrue if the typeface is a symbol typeface, otherwise EFalse.
|
SetName(const TDesC &)
IMPORT_C void
|
SetName
|
(
|
const
TDesC
&
|
aName
|
)
|
|
Sets the name of the typeface. This method should be used rather than directly accessing the iName public member.
-
panic
-
GDI 6, if aName is more than KMaxTypefaceNameLength characters long.
Parameters
const
TDesC
& aName
|
The name of the typeface (e.g. "Roman"). It should be no longer than KMaxTypefaceNameLength characters in length.
|
SetScriptTypeForMetrics(TLanguage)
IMPORT_C void
|
SetScriptTypeForMetrics
|
(
|
TLanguage
|
aLanguage
|
)
|
|
Specifies the script with which font metrics calculation will be based on.
Parameters
TLanguage
aLanguage
|
The language used to derive the required script.
|
SetScriptTypeForMetrics(TInt)
IMPORT_C void
|
SetScriptTypeForMetrics
|
(
|
TInt
|
aScript
|
)
|
|
Specifies the script with which font metrics calculation will be based on.
operator==(const TTypeface &)
Compares two typefaces for equality.
Parameters
const
TTypeface
& aTypeface
|
The typeface to be compared with.
|
Member Enumerations Documentation
Enum anonymous
Enumerators
EProportional = 1
|
Typeface is a proportional typeface (e.g. Swiss)
|
ESerif = 2
|
Typeface is a serif typeface (e.g. Times)
|
ESymbol = 4
|
Typeface is a symbol typeface (e.g. Symbol)
|
Member Data Documentation
TBufC< KMaxTypefaceNameLength > iName
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.