Update contrib.
1 // Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
26 const TInt KCInfoFontUidVal = 268435524;
29 pdr store files are backwardly compatible to this value
32 const TInt KPdrtranVersion = 22;
38 const TInt KScalableWidthTableHeightInTwips = 1000;
43 const TInt KMaxCommandStringMaxLength=0x100;
63 void InternalizeL(RReadStream& aStream);
66 TCommandString iString;
69 NONSHARABLE_CLASS(CPdrTranslation) : public CBase
77 void InternalizeL(RReadStream& aStream);
83 NONSHARABLE_CLASS(CPdrTranslates) : public CBase
90 void InternalizeL(RReadStream& aStream);
92 HBufC8* TranslateStringL(const TDesC& aString) const;
95 TInt iNumTranslations;
96 CPdrTranslation** iTranslationList;
99 NONSHARABLE_CLASS(CWidthsCodeSection) : public CBase
105 CWidthsCodeSection();
106 void InternalizeL(RReadStream& aStream);
107 ~CWidthsCodeSection();
109 TCodeSection iCodeSection;
114 NONSHARABLE_CLASS(CFontInfo) : public CBase
120 CFontInfo(TStreamId aStreamId);
121 void InternalizeL(RReadStream &aStream);
123 TInt CharWidthInPixels(TChar aChar) const;
124 TInt NumCodeSections() const;
125 TCodeSection CodeSection(TInt anIndex) const;
128 TUint16 iAscentInPixels;
129 TUint16 iMaxCharWidthInPixels;
130 TUint16 iMaxNormalCharWidthInPixels;
131 TInt iNumCodeSections;
132 CWidthsCodeSection** iCodeSectionList;
142 void InternalizeL(RReadStream &aStream);
145 TStreamId iFontInfoStreamId;
155 void InternalizeL(RReadStream& aStream);
157 TCommandString iCommandString;
160 TPdrStyle iStyle[EStyleBoldItalic + 1]; // N.B. Don't use enums TFontPosture and TFontStrokeWeight as indices
163 class TPdrScalableFontHeight
169 TPdrScalableFontHeight();
170 void InternalizeL(RReadStream& aStream);
172 TCommandString iCommandString;
173 TInt iHeightMinInTwips;
174 TInt iHeightMaxInTwips;
175 TInt iHeightDeltaInTwips;
176 TPdrStyle iStyle[EStyleBoldItalic + 1]; // N.B. Don't use enums TFontPosture and TFontStrokeWeight as indices
179 NONSHARABLE_CLASS(CTypefaceFonts) : public CBase
186 void InternalizeL(RReadStream& aStream);
188 TInt IsScalable() const;
189 TInt NumFontHeights() const;
190 TInt FontHeightInTwips(TInt aHeightIndex) const;
191 TInt FontInfoHeightInTwips(TInt aHeightIndex) const;
192 void CommandString(TDes8& aDes, TInt aHeightIndex) const;
193 TPdrStyle* Style(TInt aHeightIndex, TFontStyle& aFontStyle) const;
194 TTypeface Typeface();
196 TStyleIndex StyleIndex(TFontStyle& aFontStyle) const;
199 TInt iNumFontHeights; // Also used as flag for !iIsScalable
200 TPdrFontHeight* iFontHeightList;
201 TPdrScalableFontHeight* iScalableFontHeight;
203 TSwizzle<CPdrTranslates> iTranslates;