author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: |
williamr@4 | 15 |
* Specification of a single typeface element within a linked typeface specification. |
williamr@4 | 16 |
* |
williamr@4 | 17 |
*/ |
williamr@4 | 18 |
|
williamr@4 | 19 |
|
williamr@4 | 20 |
#ifndef OPENFONTLINKEDTYPEFACEELEMENTSPEC_H |
williamr@4 | 21 |
#define OPENFONTLINKEDTYPEFACEELEMENTSPEC_H |
williamr@4 | 22 |
|
williamr@4 | 23 |
/** |
williamr@4 | 24 |
Class for specifying a single typeface element within a linked typeface specification. |
williamr@4 | 25 |
Its features determine how the typeface is rendered within the linked fonts that use it. |
williamr@4 | 26 |
|
williamr@4 | 27 |
This class is used to communicate between the server and the rasterizer. |
williamr@4 | 28 |
|
williamr@4 | 29 |
Another similar but separate class, CLinkedTypefaceElementSpec, will be used client side |
williamr@4 | 30 |
and to communicate between the server and the rasterizer. |
williamr@4 | 31 |
|
williamr@4 | 32 |
WARNING: Class for internal and partner use ONLY. Compatibility is not guaranteed in future releases. |
williamr@4 | 33 |
|
williamr@4 | 34 |
@see CLinkedTypefaceElementSpec |
williamr@4 | 35 |
|
williamr@4 | 36 |
@publishedAll |
williamr@4 | 37 |
@released |
williamr@4 | 38 |
*/ |
williamr@4 | 39 |
NONSHARABLE_CLASS(COpenFontLinkedTypefaceElementSpec) : public CBase |
williamr@4 | 40 |
{ |
williamr@4 | 41 |
public: |
williamr@4 | 42 |
/** |
williamr@4 | 43 |
Create a new linked typeface element specification. The name specified must be an existing typeface |
williamr@4 | 44 |
that should be added to the linked typeface. The group ID links this typeface to a linked typeface |
williamr@4 | 45 |
group. |
williamr@4 | 46 |
|
williamr@4 | 47 |
@see CLinkedTypefaceSpecification::Group() |
williamr@4 | 48 |
|
williamr@4 | 49 |
@param aTypefaceName The typeface name for this element |
williamr@4 | 50 |
@param aGroupId The ID of the linked font group this element should belong to |
williamr@4 | 51 |
|
williamr@4 | 52 |
@return The newly created element spec |
williamr@4 | 53 |
*/ |
williamr@4 | 54 |
IMPORT_C static COpenFontLinkedTypefaceElementSpec* NewLC(const TDesC& aTypefaceName, TInt aGroupId); |
williamr@4 | 55 |
|
williamr@4 | 56 |
/** |
williamr@4 | 57 |
Returns the typeface that this element represents within the linked typeface. |
williamr@4 | 58 |
|
williamr@4 | 59 |
@return The element typeface name |
williamr@4 | 60 |
*/ |
williamr@4 | 61 |
IMPORT_C TPtrC ElementName() const; |
williamr@4 | 62 |
|
williamr@4 | 63 |
/** |
williamr@4 | 64 |
Set whether the element is the canonical (metrics) font. |
williamr@4 | 65 |
This is the font that provides all the metrics for the linked typeface. |
williamr@4 | 66 |
|
williamr@4 | 67 |
@param aIsCanonical Whether this element is canonical or not |
williamr@4 | 68 |
*/ |
williamr@4 | 69 |
IMPORT_C void SetCanonical(TBool aIsCanonical); |
williamr@4 | 70 |
/** |
williamr@4 | 71 |
Returns the element canonical setting. |
williamr@4 | 72 |
@return The element canonical setting |
williamr@4 | 73 |
*/ |
williamr@4 | 74 |
IMPORT_C TBool Canonical() const; |
williamr@4 | 75 |
|
williamr@4 | 76 |
/** |
williamr@4 | 77 |
Returns the group Id specified at construction. |
williamr@4 | 78 |
@return The group Id specified at construction |
williamr@4 | 79 |
*/ |
williamr@4 | 80 |
IMPORT_C TInt GroupId() const; |
williamr@4 | 81 |
|
williamr@4 | 82 |
/** |
williamr@4 | 83 |
Returns the path and filename of file containing the font this element represents. |
williamr@4 | 84 |
@return The full path and filename for the font this element represents. |
williamr@4 | 85 |
*/ |
williamr@4 | 86 |
IMPORT_C TPtrC FileName() const; |
williamr@4 | 87 |
|
williamr@4 | 88 |
/** |
williamr@4 | 89 |
Default destructor |
williamr@4 | 90 |
*/ |
williamr@4 | 91 |
IMPORT_C ~COpenFontLinkedTypefaceElementSpec(); |
williamr@4 | 92 |
|
williamr@4 | 93 |
/** |
williamr@4 | 94 |
Sets the path and filename of file containing the font this element represents. |
williamr@4 | 95 |
|
williamr@4 | 96 |
WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases. |
williamr@4 | 97 |
|
williamr@4 | 98 |
@param aFileName Path and filename of this element |
williamr@4 | 99 |
*/ |
williamr@4 | 100 |
IMPORT_C void SetFileNameL(const TDesC& aFileName); |
williamr@4 | 101 |
private: |
williamr@4 | 102 |
/** |
williamr@4 | 103 |
Constructor |
williamr@4 | 104 |
*/ |
williamr@4 | 105 |
COpenFontLinkedTypefaceElementSpec(TInt aGroupId); |
williamr@4 | 106 |
void ConstructL(const TDesC& aTypefaceName); |
williamr@4 | 107 |
private: |
williamr@4 | 108 |
HBufC* iElementName; //The Typeface Name |
williamr@4 | 109 |
HBufC* iFileName; //The file containing this typeface |
williamr@4 | 110 |
TBool iIsCanonical; |
williamr@4 | 111 |
TInt iGroupId; |
williamr@4 | 112 |
}; |
williamr@4 | 113 |
|
williamr@4 | 114 |
#endif /*OPENFONTLINKEDTYPEFACEELEMENTSPEC_H*/ |