Update contrib.
2 * Copyright (c) 1996-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.
23 #include <graphics/shapeimpl.h>
30 EFntTypefaceIndexOutOfRange,
31 EFntHeightIndexOutOfRange,
33 EFntNoTypefaceFontBitmaps,
34 EFntTypefaceHasNoFontBitmaps,
35 EFntFontBitmapNotLoaded,
36 EFntFontAccessCountNonZero,
37 EFntFontStoreFileInUse,
38 EFntKPixelHeightInTwipsZero,
39 EFntSessionCacheIndexOutOfRange,
40 EFntMetricsIndexOutOfBounds,
42 EFntRemovingAlreadyDeletedLinkedFont,
45 EFntPointerNotByteAligned,
51 GLREF_C void Panic(TFntStorePanic aPanic);
53 // COpenFontSessionCacheList is placed here rather than openfont.cpp because it is used in fntstore.cpp as well.
55 class COpenFontSessionCache;
58 class COpenFontSessionCacheList
64 inline COpenFontSessionCacheList();
65 TInt AddCache(COpenFontSessionCache* aCache);
66 COpenFontSessionCache* FindCache(TInt aSessionHandle) const;
67 void Delete(RHeap* aHeap);
68 void DeleteCache(RHeap* aHeap,TInt aSessionHandle);
69 void DeleteFontGlyphs(RHeap* aHeap,const COpenFont* aFont);
71 enum { EMaxNumCaches = 256 };
73 TInt iSessionHandleArray[EMaxNumCaches];
74 TInt iCacheOffsetArray[EMaxNumCaches];
77 inline COpenFontSessionCacheList::COpenFontSessionCacheList()
79 Mem::FillZ(this, sizeof(COpenFontSessionCacheList));
86 #define PACKED_STRUCTURE_PREFIX
87 #define PACKED_STRUCTURE_SUFFIX __attribute__(( __packed__))
88 #elif defined(__ARMCC__)
89 #define PACKED_STRUCTURE_PREFIX __packed
90 #define PACKED_STRUCTURE_SUFFIX
92 #define PACKED_STRUCTURE_PREFIX
93 #define PACKED_STRUCTURE_SUFFIX
96 PACKED_STRUCTURE_PREFIX class TBitmapFontCharacterOffset
98 Class to store an offset to the given position of a characters binary data in the
99 bitmap section of the font file.
105 TBitmapFontCharacterOffset();
106 void InternalizeL(RReadStream& aStream);
108 TUint16 iBitmapOffset; // restricts bitmap to 64k
109 } PACKED_STRUCTURE_SUFFIX;
111 PACKED_STRUCTURE_PREFIX class TBitmapFontCharacterMetrics
113 Character metrics stored in .GDR files.
115 This structure cannot be changed without changing the format of bitmap font
116 files (.GDR files). This is because a pointer to TBitmapFontCharacterMetrics is made to point
117 to part of the .GDR file in ROM.
123 TBitmapFontCharacterMetrics();
124 void InternalizeL(RReadStream& aStream);
126 TInt8 iAscentInPixels;
127 TInt8 iHeightInPixels;
128 TInt8 iLeftAdjustInPixels;
130 TInt8 iRightAdjustInPixels;
131 } PACKED_STRUCTURE_SUFFIX;