2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Specification of a single typeface element within a linked typeface specification.
20 #ifndef OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
21 #define OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
24 Class for specifying a single typeface element within a linked typeface specification.
25 Its features determine how the typeface is rendered within the linked fonts that use it.
27 This class is used to communicate between the server and the rasterizer.
29 Another similar but separate class, CLinkedTypefaceElementSpec, will be used client side
30 and to communicate between the server and the rasterizer.
32 WARNING: Class for internal and partner use ONLY. Compatibility is not guaranteed in future releases.
34 @see CLinkedTypefaceElementSpec
39 NONSHARABLE_CLASS(COpenFontLinkedTypefaceElementSpec) : public CBase
43 Create a new linked typeface element specification. The name specified must be an existing typeface
44 that should be added to the linked typeface. The group ID links this typeface to a linked typeface
47 @see CLinkedTypefaceSpecification::Group()
49 @param aTypefaceName The typeface name for this element
50 @param aGroupId The ID of the linked font group this element should belong to
52 @return The newly created element spec
54 IMPORT_C static COpenFontLinkedTypefaceElementSpec* NewLC(const TDesC& aTypefaceName, TInt aGroupId);
57 Returns the typeface that this element represents within the linked typeface.
59 @return The element typeface name
61 IMPORT_C TPtrC ElementName() const;
64 Set whether the element is the canonical (metrics) font.
65 This is the font that provides all the metrics for the linked typeface.
67 @param aIsCanonical Whether this element is canonical or not
69 IMPORT_C void SetCanonical(TBool aIsCanonical);
71 Returns the element canonical setting.
72 @return The element canonical setting
74 IMPORT_C TBool Canonical() const;
77 Returns the group Id specified at construction.
78 @return The group Id specified at construction
80 IMPORT_C TInt GroupId() const;
83 Returns the path and filename of file containing the font this element represents.
84 @return The full path and filename for the font this element represents.
86 IMPORT_C TPtrC FileName() const;
91 IMPORT_C ~COpenFontLinkedTypefaceElementSpec();
94 Sets the path and filename of file containing the font this element represents.
96 WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
98 @param aFileName Path and filename of this element
100 IMPORT_C void SetFileNameL(const TDesC& aFileName);
105 COpenFontLinkedTypefaceElementSpec(TInt aGroupId);
106 void ConstructL(const TDesC& aTypefaceName);
108 HBufC* iElementName; //The Typeface Name
109 HBufC* iFileName; //The file containing this typeface
114 #endif /*OPENFONTLINKEDTYPEFACEELEMENTSPEC_H*/