1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/openfontlinkedtypefaceelementspec.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,114 @@
1.4 +/*
1.5 +* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* Specification of a single typeface element within a linked typeface specification.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
1.24 +#define OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
1.25 +
1.26 +/**
1.27 +Class for specifying a single typeface element within a linked typeface specification.
1.28 +Its features determine how the typeface is rendered within the linked fonts that use it.
1.29 +
1.30 +This class is used to communicate between the server and the rasterizer.
1.31 +
1.32 +Another similar but separate class, CLinkedTypefaceElementSpec, will be used client side
1.33 +and to communicate between the server and the rasterizer.
1.34 +
1.35 +WARNING: Class for internal and partner use ONLY. Compatibility is not guaranteed in future releases.
1.36 +
1.37 +@see CLinkedTypefaceElementSpec
1.38 +
1.39 +@publishedAll
1.40 +@released
1.41 +*/
1.42 +NONSHARABLE_CLASS(COpenFontLinkedTypefaceElementSpec) : public CBase
1.43 + {
1.44 +public:
1.45 + /**
1.46 + Create a new linked typeface element specification. The name specified must be an existing typeface
1.47 + that should be added to the linked typeface. The group ID links this typeface to a linked typeface
1.48 + group.
1.49 +
1.50 + @see CLinkedTypefaceSpecification::Group()
1.51 +
1.52 + @param aTypefaceName The typeface name for this element
1.53 + @param aGroupId The ID of the linked font group this element should belong to
1.54 +
1.55 + @return The newly created element spec
1.56 + */
1.57 + IMPORT_C static COpenFontLinkedTypefaceElementSpec* NewLC(const TDesC& aTypefaceName, TInt aGroupId);
1.58 +
1.59 + /**
1.60 + Returns the typeface that this element represents within the linked typeface.
1.61 +
1.62 + @return The element typeface name
1.63 + */
1.64 + IMPORT_C TPtrC ElementName() const;
1.65 +
1.66 + /**
1.67 + Set whether the element is the canonical (metrics) font.
1.68 + This is the font that provides all the metrics for the linked typeface.
1.69 +
1.70 + @param aIsCanonical Whether this element is canonical or not
1.71 + */
1.72 + IMPORT_C void SetCanonical(TBool aIsCanonical);
1.73 + /**
1.74 + Returns the element canonical setting.
1.75 + @return The element canonical setting
1.76 + */
1.77 + IMPORT_C TBool Canonical() const;
1.78 +
1.79 + /**
1.80 + Returns the group Id specified at construction.
1.81 + @return The group Id specified at construction
1.82 + */
1.83 + IMPORT_C TInt GroupId() const;
1.84 +
1.85 + /**
1.86 + Returns the path and filename of file containing the font this element represents.
1.87 + @return The full path and filename for the font this element represents.
1.88 + */
1.89 + IMPORT_C TPtrC FileName() const;
1.90 +
1.91 + /**
1.92 + Default destructor
1.93 + */
1.94 + IMPORT_C ~COpenFontLinkedTypefaceElementSpec();
1.95 +
1.96 + /**
1.97 + Sets the path and filename of file containing the font this element represents.
1.98 +
1.99 + WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
1.100 +
1.101 + @param aFileName Path and filename of this element
1.102 + */
1.103 + IMPORT_C void SetFileNameL(const TDesC& aFileName);
1.104 +private:
1.105 + /**
1.106 + Constructor
1.107 + */
1.108 + COpenFontLinkedTypefaceElementSpec(TInt aGroupId);
1.109 + void ConstructL(const TDesC& aTypefaceName);
1.110 +private:
1.111 + HBufC* iElementName; //The Typeface Name
1.112 + HBufC* iFileName; //The file containing this typeface
1.113 + TBool iIsCanonical;
1.114 + TInt iGroupId;
1.115 + };
1.116 +
1.117 +#endif /*OPENFONTLINKEDTYPEFACEELEMENTSPEC_H*/