TTypeface Class Reference
Detailed Description
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.
Member Attribute Documentation
Member Enumeration Documentation
Enum anonymous
Enumerator | Value | Description |
---|
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)
|
Constructor & Destructor Documentation
Member Function Documentation
Attributes ( )
IMPORT_C TInt | Attributes | ( | ) | const |
Gets the combination of attributes of the typeface.
Returns: 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.
Parameter | Description | 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.
Parameter | Description | aStream | Stream from which the typeface is to be internalised. |
IsProportional ( )
IMPORT_C TBool | IsProportional | ( | ) | const |
Gets the typeface's proportional attribute.
Returns: ETrue if the typeface is proportional, EFalse otherwise.
IsSerif ( )
IMPORT_C TBool | IsSerif | ( | ) | const |
Gets the typeface's serif attribute.
Returns: ETrue if the typeface is a serif typeface, EFalse otherwise
IsSymbol ( )
IMPORT_C TBool | IsSymbol | ( | ) | const |
Gets the typeface's symbol attribute.
Returns: ETrue if the typeface is a symbol typeface, EFalse otherwise
Name ( )
IMPORT_C const TDesC & | Name | ( | ) | const |
Returns the name of the typeface.
Returns: The name of the typeface.
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.
Parameter | Description | aAttributes | A bitmap defining the combination of attributes. |
SetIsProportional ( TBool )
IMPORT_C void | SetIsProportional | ( | TBool | aIsProportional | ) | |
Sets the typeface's proportional attribute.
Parameter | Description | 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.
Parameter | Description | 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.
Parameter | Description | 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.
Parameter | Description | 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.
Parameter | Description | 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.
Parameter | Description | aScript | The script. |
operator== ( const TTypeface & )
Compares two typefaces for equality.
Parameter | Description | aTypeface | The typeface to be compared with. |
Returns: ETrue, if this TTypeface is equal to aTypeface, otherwise EFalse.