class CLinkedTypefaceSpecification : public CBase |
This class contains the specification of a linked typeface. It is made up of groups and typefaces.
Groups ( CLinkedTypefaceGroup ) must contain one or more typeface; the attributes of the group control how the rasterizer draws the typefaces within the group.
Typefaces ( CLinkedTypefaceElementSpec ) specify which individual typefaces make up the linked typeface. These are referred to as "elements" of the linked typeface.
Once the linked typeface has been created users can use it as if it were any other typeface assuming there is a rasteriser that supports this feature available. When selecting a character the rasterize searches each typeface in turn from the lowest index to the highest. When drawing text, the first typeface to contain the required character is used.
KMaxLinkedTypefaces and KMaxLinkedTypefaceGroups define the maximum number of typefaces and groups that can be added to the specification.
This class is not thread safe.
WARNING: Class for internal and partner use ONLY. Compatibility is not guaranteed in future releases.
CLinkedTypefaceElementSpec CLinkedTypefaceGroup KLinkedMaxTypefaces KMaxLinkedTypefaceGroups
Public Member Functions | |
---|---|
~CLinkedTypefaceSpecification () | |
IMPORT_C void | AddLinkedTypefaceGroupL ( CLinkedTypefaceGroup &) |
IMPORT_C void | AddTypefaceAtBackL ( CLinkedTypefaceElementSpec &) |
IMPORT_C void | AddTypefaceAtIndexL ( CLinkedTypefaceElementSpec &, TInt ) |
IMPORT_C TInt | CanonicalIndex () |
IMPORT_C void | Clear () |
IMPORT_C void | FetchLinkedTypefaceSpecificationL ( CFbsTypefaceStore &) |
IMPORT_C CLinkedTypefaceGroup * | Group ( TInt ) |
IMPORT_C CLinkedTypefaceGroup * | GroupById ( TInt ) |
IMPORT_C TInt | GroupCount () |
IMPORT_C TPtrC | Name () |
IMPORT_C CLinkedTypefaceSpecification * | NewLC (const TDesC &) |
IMPORT_C void | RegisterLinkedTypefaceL ( CFbsTypefaceStore &) |
IMPORT_C TInt | RemoveLinkedTypefaceGroup ( TInt ) |
IMPORT_C TInt | RemoveTypeface ( TInt ) |
IMPORT_C CLinkedTypefaceElementSpec * | Typeface ( TInt ) |
IMPORT_C TInt | TypefaceCount () |
IMPORT_C void | UpdateLinkedTypefaceL ( CFbsTypefaceStore &) |
Private Member Functions | |
---|---|
CLinkedTypefaceSpecification () | |
void | ConstructL (const TDesC &) |
void | DoAddTypefaceL ( CLinkedTypefaceElementSpec &, TInt ) |
Private Attributes | |
---|---|
CLinkedTypefaceSpecificationBody * | iBody |
IMPORT_C void | AddLinkedTypefaceGroupL | ( | CLinkedTypefaceGroup & | aGroup | ) |
Adds the group specified to this specification. The specification takes ownership of the group if addition is successful.
CLinkedTypefaceGroup & aGroup | The group to be added |
IMPORT_C void | AddTypefaceAtBackL | ( | CLinkedTypefaceElementSpec & | 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 if adding is successful.
CLinkedTypefaceElementSpec & aElementSpec |
IMPORT_C void | AddTypefaceAtIndexL | ( | CLinkedTypefaceElementSpec & | aElementSpec, |
TInt | aIndex | |||
) |
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 if adding is successful.
CLinkedTypefaceElementSpec & aElementSpec | The specification to be added. |
TInt aIndex | The position at which the element spec will be added. |
IMPORT_C TInt | CanonicalIndex | ( | ) |
Function to return the index of the canonical (metrics) typeface. The typeface can be retrieved by passing the index to Typeface() .
IMPORT_C void | Clear | ( | ) |
Removes and destroys all groups and elements from the specification.
WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
void | ConstructL | ( | const TDesC & | aTypefaceName | ) | [private] |
const TDesC & aTypefaceName |
void | DoAddTypefaceL | ( | CLinkedTypefaceElementSpec & | aElementSpec, |
TInt | aPos | |||
) | [private] |
CLinkedTypefaceElementSpec & aElementSpec | |
TInt aPos |
IMPORT_C void | FetchLinkedTypefaceSpecificationL | ( | CFbsTypefaceStore & | aStore | ) |
Retrieves the linked typeface specification from the server; the name of the typeface to retrieve should be specified at construction. All typefaces and groups contained in the specification are removed before retrieval of the new data.
CFbsTypefaceStore & aStore | A pointer to the FontStore |
IMPORT_C CLinkedTypefaceGroup * | Group | ( | TInt | aGroupIndex | ) | 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.
TInt aGroupIndex | The linked typeface groups index within the specification |
IMPORT_C CLinkedTypefaceGroup * | GroupById | ( | TInt | aGroupId | ) | const |
Returns the linked typeface group with the specified group ID.
TInt aGroupId | The linked typeface group ID |
IMPORT_C TInt | GroupCount | ( | ) | const |
Returns the number of groups that this linked typeface specification contains.
IMPORT_C CLinkedTypefaceSpecification * | NewLC | ( | const TDesC & | aTypefaceName | ) | [static] |
This function constructs the linked typeface specification and places it on the CleanupStack .
The specification must contain at least one group and one typeface in order for registration to be successful.
const TDesC & aTypefaceName |
IMPORT_C void | RegisterLinkedTypefaceL | ( | CFbsTypefaceStore & | aStore | ) |
Creates the linked typeface so that it is available to use a normal typeface.
CFbsTypefaceStore & aStore | The Typeface Store the linked typeface should be registered with |
IMPORT_C TInt | RemoveLinkedTypefaceGroup | ( | TInt | aGroupId | ) |
This will remove the group and all the elements associated with it.
TInt aGroupId | The Id of the group to be removed |
IMPORT_C TInt | RemoveTypeface | ( | TInt | aIndex | ) |
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.
TInt aIndex | the index of the element spec to be removed |
IMPORT_C CLinkedTypefaceElementSpec * | Typeface | ( | TInt | aIndex | ) | const |
Returns the linked typeface at the specified index. The first typeface is at index 0, the last at TypefaceCount() -1. CLinkedTypefaceSpecification::NumberOfTypefaces()
TInt aIndex |
IMPORT_C TInt | TypefaceCount | ( | ) | const |
The number of typeface that have been added to this object
IMPORT_C void | UpdateLinkedTypefaceL | ( | CFbsTypefaceStore & | aStore | ) |
Update the specification of an existing linked typeface.
CFbsTypefaceStore & aStore | A typeface store |
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.