COpenFontLinkedTypefaceSpecification Class Reference

class COpenFontLinkedTypefaceSpecification : public CBase

This class contains the specification of a linked typeface passed from font store to a rasterizer. It is made up of groups and typefaces. A group (CLinkedTypefaceGroup) contains a number of attributes that can apply to similar typefaces within the linked typeface. One or more typeface may belong to a group. Typefaces (COpenFontLinkedTypefaceElementSpec) specifiy which typefaces are used within this linked font.

After creation, the linked typeface can be used as if it were any other typeface. This assumes that there is a rasteriser that supports this feature available. When looking up characters the first typeface containing the required character is used.

KMaxLinkedTypefaces and KMaxLinkedTypefaceGroups define the maximum number of typefaces and groups that can be added to the specification.

COpenFontLinkedTypefaceElementSpec

CLinkedTypefaceGroup

CLinkedTypefaceSpecification

CLinkedTypefaceElementSpec

Inherits from

  • COpenFontLinkedTypefaceSpecification

Constructor & Destructor Documentation

COpenFontLinkedTypefaceSpecification()

COpenFontLinkedTypefaceSpecification()[private]

~COpenFontLinkedTypefaceSpecification()

IMPORT_C~COpenFontLinkedTypefaceSpecification()

Default destructor

Member Functions Documentation

AddLinkedTypefaceGroupL(CLinkedTypefaceGroup &)

IMPORT_C voidAddLinkedTypefaceGroupL(CLinkedTypefaceGroup &aGroup)

Adds the group specified to this specification The specification takes ownership of the group if addition is successful.

COpenFontLinkedTypefaceSpecification::RemoveLinkedTypefaceGroup()

leave

KErrAlreadyExists A group with the same ID is already present in the specification

Parameters

CLinkedTypefaceGroup & aGroupThe group to be added

AddTypefaceAtBackL(COpenFontLinkedTypefaceElementSpec &)

IMPORT_C voidAddTypefaceAtBackL(COpenFontLinkedTypefaceElementSpec &aElementSpec)

Adds the supplied CLinkedTypefaceElementSpec to the Linked Typeface specification. The element is placed at the back of the specification. Adding a canonical element will only be successful if one has not already been added. The specification takes ownership of the element specification.

CLinkedTypefaceSpecification::AddTypefaceAtIndexL()

CLinkedTypefaceSpecification::RemoveTypeface()

KMaxLinkedTypefaces

leave

KErrArgument If the element is canonical and a canonical element already exists or if the group ID doesn't exist

leave

KErrNoMemory There was not enough memory available to perform this operation

leave

KErrOverflow The typeface specification is full; adding would exceed KMaxLinkedTypefaces

Parameters

COpenFontLinkedTypefaceElementSpec & aElementSpec

AddTypefaceAtIndexL(COpenFontLinkedTypefaceElementSpec &, TInt)

IMPORT_C voidAddTypefaceAtIndexL(COpenFontLinkedTypefaceElementSpec &aElementSpec,
TIntaIndex
)

Adds the supplied CLinkedTypefaceElementSpec to the Linked Typeface specification. The element is placed at the specified index. Adding a canonical element will only be successful if one has not already been added. The specification takes ownership of the element specification.

CLinkedTypefaceSpecification::AddTypefaceAtBackL()

CLinkedTypefaceSpecification::RemoveTypeface()

KMaxLinkedTypefaces

leave

KErrArgument If the element is canonical and a canonical element already exists or if the group ID doesn't exist

leave

KErrNoMemory There was not enough memory available to perform this operation

leave

KErrOverflow The typeface specification is full; adding would exceed KMaxLinkedTypefaces

Parameters

COpenFontLinkedTypefaceElementSpec & aElementSpecThe specification to be added.
TInt aIndexThe position at which the element spec will be added.

CanonicalIndex()

IMPORT_C TIntCanonicalIndex()const

Returns the index of the canonical (metrics) typeface.

The can be retrieved by passing the index to Typeface().

The index to the canonical typeface; KErrNoFound The canonical doesn't exist; KErrOverflow There is more than one canonical

COpenFontLinkedTypefaceSpecification::Typeface()

ConstructL(const TDesC &)

voidConstructL(const TDesC &aName)[private]

Parameters

const TDesC & aName

ConstructL(const TLinkedTypefaceSpecificationArgs &)

voidConstructL(const TLinkedTypefaceSpecificationArgs &aSpecArgs)[private]

Parameters

const TLinkedTypefaceSpecificationArgs & aSpecArgs

DoAddTypefaceL(COpenFontLinkedTypefaceElementSpec &, TInt)

voidDoAddTypefaceL(COpenFontLinkedTypefaceElementSpec &aElementSpec,
TIntaPos
)[private]

Parameters

COpenFontLinkedTypefaceElementSpec & aElementSpec
TInt aPos

Group(TInt)

IMPORT_C const CLinkedTypefaceGroup *Group(TIntaIndex)const

Returns the linked typeface group at the specified index within the specification. The Index ranges from 0 to the value returned by NumberOfGroups()-1.

The linked typeface group specified or NULL if it doesn't exist

Parameters

TInt aIndex

GroupById(TInt)

IMPORT_C CLinkedTypefaceGroup *GroupById(TIntaGroupId)const

Returns the linked typeface group with the specified group ID.

The linked typeface group specified or NULL if it doesn't exist

Parameters

TInt aGroupIdThe linked typeface group ID

GroupCount()

IMPORT_C TIntGroupCount()const

Returns the number of groups that this linked typeface specification contains.

CLinkedTypefaceSpecification::Group()

TInt Number of groups

Name()

IMPORT_C TPtrCName()const

Returns the name of this linked typeface The name of this linked typeface

NewLC(const TDesC &)

IMPORT_C COpenFontLinkedTypefaceSpecification *NewLC(const TDesC &aName)[static]

This function constructs the linked typeface specification and places it on the CleanupStack.

CLinkedTypefaceSpecification* A linked typeface specification object

Parameters

const TDesC & aNameThe name of the linked typeface. This name should not be the same as an existing typeface.

NewLC(const TLinkedTypefaceSpecificationArgs &)

IMPORT_C COpenFontLinkedTypefaceSpecification *NewLC(const TLinkedTypefaceSpecificationArgs &aSpecArgs)[static]

This function constructs the linked typeface specification from the passed TLinkedTypefaceSpecificationArgs and places it on the CleanupStack.

WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.

A linked typeface specification object

Parameters

const TLinkedTypefaceSpecificationArgs & aSpecArgsThe TLinkedTypefaceSpecificationArgs container passed from font and bitmap server

RemoveLinkedTypefaceGroup(TInt)

IMPORT_C TIntRemoveLinkedTypefaceGroup(TIntaGroupId)

This will remove the group and all the elements associated with it.

Parameters

TInt aGroupIdThe Id of the group to be removed

RemoveTypeface(TInt)

IMPORT_C TIntRemoveTypeface(TIntaIndex)

Removes the element spec at the specified index from this specification. This function deletes the element spec. If the element is the only one within its group the group is also removed and deleted from the specification.

KErrNotFound If the index is negative or larger than the number of typeface elements or the element doesn't exist

Parameters

TInt aIndexthe index of the element spec to be removed

Typeface(TInt)

IMPORT_C COpenFontLinkedTypefaceElementSpec *Typeface(TIntaIndex)const

Returns the linked typeface at the specified index.

The linked typeface; NULL if there is no typeface at the specified index

COpenFontLinkedTypefaceSpecification::NumberOfTypefaces()

Parameters

TInt aIndex

TypefaceCount()

IMPORT_C TIntTypefaceCount()const

Returns the number of typefaces that have been added to this specification The number of typefaces that have been added to this specification

Member Data Documentation

RPointerArray< CLinkedTypefaceGroup > iGroups

RPointerArray< CLinkedTypefaceGroup >iGroups[private]

HBufC * iLinkedTypefaceFileName

HBufC *iLinkedTypefaceFileName[private]

HBufC * iLinkedTypefaceName

HBufC *iLinkedTypefaceName[private]

RPointerArray< COpenFontLinkedTypefaceElementSpec > iTypefaces

RPointerArray< COpenFontLinkedTypefaceElementSpec >iTypefaces[private]