williamr@4: /* williamr@4: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * Specification of a single typeface element within a linked typeface specification. williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: #ifndef OPENFONTLINKEDTYPEFACEELEMENTSPEC_H williamr@4: #define OPENFONTLINKEDTYPEFACEELEMENTSPEC_H williamr@4: williamr@4: /** williamr@4: Class for specifying a single typeface element within a linked typeface specification. williamr@4: Its features determine how the typeface is rendered within the linked fonts that use it. williamr@4: williamr@4: This class is used to communicate between the server and the rasterizer. williamr@4: williamr@4: Another similar but separate class, CLinkedTypefaceElementSpec, will be used client side williamr@4: and to communicate between the server and the rasterizer. williamr@4: williamr@4: WARNING: Class for internal and partner use ONLY. Compatibility is not guaranteed in future releases. williamr@4: williamr@4: @see CLinkedTypefaceElementSpec williamr@4: williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: NONSHARABLE_CLASS(COpenFontLinkedTypefaceElementSpec) : public CBase williamr@4: { williamr@4: public: williamr@4: /** williamr@4: Create a new linked typeface element specification. The name specified must be an existing typeface williamr@4: that should be added to the linked typeface. The group ID links this typeface to a linked typeface williamr@4: group. williamr@4: williamr@4: @see CLinkedTypefaceSpecification::Group() williamr@4: williamr@4: @param aTypefaceName The typeface name for this element williamr@4: @param aGroupId The ID of the linked font group this element should belong to williamr@4: williamr@4: @return The newly created element spec williamr@4: */ williamr@4: IMPORT_C static COpenFontLinkedTypefaceElementSpec* NewLC(const TDesC& aTypefaceName, TInt aGroupId); williamr@4: williamr@4: /** williamr@4: Returns the typeface that this element represents within the linked typeface. williamr@4: williamr@4: @return The element typeface name williamr@4: */ williamr@4: IMPORT_C TPtrC ElementName() const; williamr@4: williamr@4: /** williamr@4: Set whether the element is the canonical (metrics) font. williamr@4: This is the font that provides all the metrics for the linked typeface. williamr@4: williamr@4: @param aIsCanonical Whether this element is canonical or not williamr@4: */ williamr@4: IMPORT_C void SetCanonical(TBool aIsCanonical); williamr@4: /** williamr@4: Returns the element canonical setting. williamr@4: @return The element canonical setting williamr@4: */ williamr@4: IMPORT_C TBool Canonical() const; williamr@4: williamr@4: /** williamr@4: Returns the group Id specified at construction. williamr@4: @return The group Id specified at construction williamr@4: */ williamr@4: IMPORT_C TInt GroupId() const; williamr@4: williamr@4: /** williamr@4: Returns the path and filename of file containing the font this element represents. williamr@4: @return The full path and filename for the font this element represents. williamr@4: */ williamr@4: IMPORT_C TPtrC FileName() const; williamr@4: williamr@4: /** williamr@4: Default destructor williamr@4: */ williamr@4: IMPORT_C ~COpenFontLinkedTypefaceElementSpec(); williamr@4: williamr@4: /** williamr@4: Sets the path and filename of file containing the font this element represents. williamr@4: williamr@4: WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases. williamr@4: williamr@4: @param aFileName Path and filename of this element williamr@4: */ williamr@4: IMPORT_C void SetFileNameL(const TDesC& aFileName); williamr@4: private: williamr@4: /** williamr@4: Constructor williamr@4: */ williamr@4: COpenFontLinkedTypefaceElementSpec(TInt aGroupId); williamr@4: void ConstructL(const TDesC& aTypefaceName); williamr@4: private: williamr@4: HBufC* iElementName; //The Typeface Name williamr@4: HBufC* iFileName; //The file containing this typeface williamr@4: TBool iIsCanonical; williamr@4: TInt iGroupId; williamr@4: }; williamr@4: williamr@4: #endif /*OPENFONTLINKEDTYPEFACEELEMENTSPEC_H*/