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

Typeface name and attributes. More...

#include <gdi.h>

Public Types

enum  { EProportional = 1 , ESerif = 2 , ESymbol = 4 }
 

Public Member Functions

IMPORT_C TTypeface ()
 Default C++ constructor.
 
IMPORT_C TBool operator== (const TTypeface &aTypeface) const
 Compares two typefaces for equality.
 
IMPORT_C void InternalizeL (RReadStream &aStream)
 Internalises a typeface from a read stream.
 
IMPORT_C void ExternalizeL (RWriteStream &aStream) const
 Externalises a typeface to a write stream.
 
IMPORT_C void SetAttributes (TInt aAttributes)
 Set the combination of attributes for this typeface.
 
IMPORT_C void SetIsProportional (TBool aIsProportional)
 Sets the typeface's proportional attribute.
 
IMPORT_C void SetIsSerif (TBool aIsSerif)
 Sets the typeface's serif attribute.
 
IMPORT_C void SetIsSymbol (TBool aIsSymbol)
 Sets the typeface's symbol attribute.
 
IMPORT_C TInt Attributes () const
 Gets the combination of attributes of the typeface.
 
IMPORT_C TBool IsProportional () const
 Gets the typeface's proportional attribute.
 
IMPORT_C TBool IsSerif () const
 Gets the typeface's serif attribute.
 
IMPORT_C TBool IsSymbol () const
 Gets the typeface's symbol attribute.
 
IMPORT_C void SetScriptTypeForMetrics (TLanguage aLanguage)
 Specifies the script with which font metrics calculation will be based on.
 
IMPORT_C void SetScriptTypeForMetrics (TInt aScript)
 Specifies the script with which font metrics calculation will be based on.
 
IMPORT_C TInt ScriptTypeForMetrics () const
 Gets the script with which font metrics calculation will be based on.
 
IMPORT_C void SetName (const TDesC &aName)
 
IMPORT_C const TDesC & Name () const
 Returns the name of the typeface.
 

Public Attributes

TBufC< KMaxTypefaceNameLength > iName
 The typeface name.
 

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.

API status
Published to all clients. Released API.

Definition at line 590 of file gdi.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
EProportional 

Typeface is a proportional typeface (e.g.

Swiss)

ESerif 

Typeface is a serif typeface (e.g.

Times)

ESymbol 

Typeface is a symbol typeface (e.g.

Symbol)

Definition at line 593 of file gdi.h.

Constructor & Destructor Documentation

◆ TTypeface()

IMPORT_C TTypeface::TTypeface ( )

Default C++ constructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Attributes()

IMPORT_C TInt TTypeface::Attributes ( ) const

Gets the combination of attributes of the typeface.

(generated from Symbian Developer Library)

◆ ExternalizeL()

IMPORT_C void TTypeface::ExternalizeL ( RWriteStream &  aStream) const

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
aStreamThe stream to which the typeface is to be externalised.

(generated from Symbian Developer Library)

◆ InternalizeL()

IMPORT_C void TTypeface::InternalizeL ( RReadStream &  aStream)

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
aStreamStream from which the typeface is to be internalised.

(generated from Symbian Developer Library)

◆ IsProportional()

IMPORT_C TBool TTypeface::IsProportional ( ) const

Gets the typeface's proportional attribute.

(generated from Symbian Developer Library)

◆ IsSerif()

IMPORT_C TBool TTypeface::IsSerif ( ) const

Gets the typeface's serif attribute.

(generated from Symbian Developer Library)

◆ IsSymbol()

IMPORT_C TBool TTypeface::IsSymbol ( ) const

Gets the typeface's symbol attribute.

(generated from Symbian Developer Library)

◆ Name()

IMPORT_C const TDesC & TTypeface::Name ( ) const

Returns the name of the typeface.

(generated from Symbian Developer Library)

◆ operator==()

IMPORT_C TBool TTypeface::operator== ( const TTypeface &  aTypeface) const

Compares two typefaces for equality.

Parameters
aTypefaceThe typeface to be compared with.

(generated from Symbian Developer Library)

◆ ScriptTypeForMetrics()

IMPORT_C TInt TTypeface::ScriptTypeForMetrics ( ) const

Gets the script with which font metrics calculation will be based on.

(generated from Symbian Developer Library)

◆ SetAttributes()

IMPORT_C void TTypeface::SetAttributes ( TInt  aAttributes)

Set the combination of attributes for this typeface.

Parameters
aAttributesA bitmap defining the combination of attributes.

(generated from Symbian Developer Library)

◆ SetIsProportional()

IMPORT_C void TTypeface::SetIsProportional ( TBool  aIsProportional)

Sets the typeface's proportional attribute.

Parameters
aIsProportionalETrue if the typeface is a proportional typeface, otherwise EFalse.

(generated from Symbian Developer Library)

◆ SetIsSerif()

IMPORT_C void TTypeface::SetIsSerif ( TBool  aIsSerif)

Sets the typeface's serif attribute.

Parameters
aIsSerifETrue if the typeface is a serif typeface, otherwise EFalse.

(generated from Symbian Developer Library)

◆ SetIsSymbol()

IMPORT_C void TTypeface::SetIsSymbol ( TBool  aIsSymbol)

Sets the typeface's symbol attribute.

Parameters
aIsSymbolETrue if the typeface is a symbol typeface, otherwise EFalse.

(generated from Symbian Developer Library)

◆ SetName()

IMPORT_C void TTypeface::SetName ( const TDesC &  aName)
Parameters
aNameThe name of the typeface (e.g. "Roman"). It should be no longer than KMaxTypefaceNameLength characters in length.

Panic condition: GDI 6, if aName is more than KMaxTypefaceNameLength characters long.

(generated from Symbian Developer Library)

◆ SetScriptTypeForMetrics() [1/2]

IMPORT_C void TTypeface::SetScriptTypeForMetrics ( TInt  aScript)

Specifies the script with which font metrics calculation will be based on.

Parameters
aScriptThe script.

(generated from Symbian Developer Library)

◆ SetScriptTypeForMetrics() [2/2]

IMPORT_C void TTypeface::SetScriptTypeForMetrics ( TLanguage  aLanguage)

Specifies the script with which font metrics calculation will be based on.

Parameters
aLanguageThe language used to derive the required script.

(generated from Symbian Developer Library)

Member Data Documentation

◆ iName

TBufC<KMaxTypefaceNameLength> TTypeface::iName

The typeface name.

Definition at line 628 of file gdi.h.


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