50 class TShapeMessageParameters; |
50 class TShapeMessageParameters; |
51 class CTypefaceSupportInfo; |
51 class CTypefaceSupportInfo; |
52 class COpenFontRasterizer; |
52 class COpenFontRasterizer; |
53 class CLinkedTypefaceGroup; |
53 class CLinkedTypefaceGroup; |
54 IMPORT_C extern const TInt8 KLinkedFontDrive; |
54 IMPORT_C extern const TInt8 KLinkedFontDrive; |
|
55 IMPORT_C extern const TUint32 KFontTable_GlyphOutline_CacheMaxMem; |
55 |
56 |
56 /** |
57 /** |
57 WARNING: Class for internal use ONLY. Compatibility is not guaranteed in future releases. |
58 WARNING: Class for internal use ONLY. Compatibility is not guaranteed in future releases. |
58 @publishedAll |
59 @publishedAll |
59 @released |
60 @released |
147 IMPORT_C void operator delete(TAny*); |
148 IMPORT_C void operator delete(TAny*); |
148 inline TBool IsOpenFont() const; |
149 inline TBool IsOpenFont() const; |
149 inline COpenFont* OpenFont() const; |
150 inline COpenFont* OpenFont() const; |
150 inline TGlyphBitmapType GlyphBitmapType() const; |
151 inline TGlyphBitmapType GlyphBitmapType() const; |
151 IMPORT_C TUint32 UniqueFontId(); |
152 IMPORT_C TUint32 UniqueFontId(); |
152 |
153 IMPORT_C TInt GetFontTable(TUint32 aTag, TAny*& aTableContent, |
|
154 TInt& aLength, TInt aSessionHandle); |
|
155 IMPORT_C TInt GetGlyphOutline(TUint aCode, |
|
156 TBool aHinted, TAny*& aOutline, TInt& aLength, TInt aSessionHandle); |
|
157 IMPORT_C void ReleaseGlyphOutlines(TInt aCount, const TUint* aCodes, |
|
158 TBool aHinted, TInt aSessionHandle); |
|
159 IMPORT_C void ReleaseFontTable(TUint32 aTag, TInt aSessionHandle); |
|
160 |
153 private: |
161 private: |
154 // From CFont |
162 // From CFont |
155 IMPORT_C virtual TUid DoTypeUid() const; |
163 IMPORT_C virtual TUid DoTypeUid() const; |
156 IMPORT_C virtual TInt DoHeightInPixels() const; |
164 IMPORT_C virtual TInt DoHeightInPixels() const; |
157 IMPORT_C virtual TInt DoAscentInPixels() const; |
165 IMPORT_C virtual TInt DoAscentInPixels() const; |
260 |
268 |
261 IMPORT_C void operator = (const CLinkedTypefaceSpecification& aRhs); |
269 IMPORT_C void operator = (const CLinkedTypefaceSpecification& aRhs); |
262 IMPORT_C void operator = (const COpenFontLinkedTypefaceSpecification& aRhs); |
270 IMPORT_C void operator = (const COpenFontLinkedTypefaceSpecification& aRhs); |
263 }; |
271 }; |
264 |
272 |
|
273 |
|
274 |
|
275 class TUnhintedOutlineId; |
|
276 class THintedOutlineId; |
|
277 class CFontTableCache; |
|
278 class CUnhintedOutlineCache; |
|
279 class CHintedOutlineCache; |
|
280 class TFontTableGlyphOutlineCacheMemMonitor; |
|
281 |
265 class CFontStore : public CTypefaceStore |
282 class CFontStore : public CTypefaceStore |
266 /** |
283 /** |
267 A store for fonts. |
284 A store for fonts. |
268 |
285 |
269 Stores and handles both open and fixed-size fonts. Open fonts are made from |
286 Stores and handles both open and fixed-size fonts. Open fonts are made from |
318 IMPORT_C void GetLinkedTypefaceL(TLinkedTypefaceSpecificationArgs &aLinkedTypefaceSpec); |
335 IMPORT_C void GetLinkedTypefaceL(TLinkedTypefaceSpecificationArgs &aLinkedTypefaceSpec); |
319 IMPORT_C TBool HaveTypefaceFamilyName(const TDesC& aName); |
336 IMPORT_C TBool HaveTypefaceFamilyName(const TDesC& aName); |
320 IMPORT_C void UpdateLinkedTypefaceL(const TLinkedTypefaceSpecificationArgs& aLinkedTypefaceSpec); |
337 IMPORT_C void UpdateLinkedTypefaceL(const TLinkedTypefaceSpecificationArgs& aLinkedTypefaceSpec); |
321 IMPORT_C void LoadFontsAtStartupL(); |
338 IMPORT_C void LoadFontsAtStartupL(); |
322 IMPORT_C TBool GetFontFilePath(const TDesC& aFontName, TFileName& aFilePath) const; |
339 IMPORT_C TBool GetFontFilePath(const TDesC& aFontName, TFileName& aFilePath) const; |
|
340 IMPORT_C void CleanupCacheOnFbsSessionTermination(TInt aSessionHandle); |
|
341 |
|
342 TInt CacheFontTable(TUid aFileUid, TUint32 aTag, TAny*& aContent, TInt aLength); |
|
343 TInt ReleaseFontTable(TUid aFileUid, TUint32 aTag, TInt aSessionHandle); |
|
344 TInt FindFontTableInCache(TUid aFileUid, TUint32 aTag, TAny*& aContent, TInt& aLength); |
|
345 TInt IncFontTableRefCount(TUid aFileUid, TUint32 aTag, TInt aSessionHandle); |
|
346 TInt DecFontTableRefCount(TUid aFileUid, TUint32 aTag, TInt aSessionHandle); |
|
347 TInt CacheUnhintedOutline(const TUnhintedOutlineId& aOutlineId, TAny* aData, |
|
348 TInt aLength, TAny*& aOutline, TInt& aLen); |
|
349 TInt CacheHintedOutline(const THintedOutlineId& aOutlineId, TAny* aData, TInt aLength, |
|
350 TAny*& aOutline, TInt& aLen); |
|
351 TInt ReleaseUnhintedOutline(const TUnhintedOutlineId& aOutlineId, TInt aSessionHandle); |
|
352 TInt ReleaseHintedOutline(const THintedOutlineId& aOutlineId, TInt aSessionHandle); |
|
353 TInt IncreaseUnhintedOutlineRefCount(const TUnhintedOutlineId& aOutlineId, TInt aSessionHandle); |
|
354 TInt IncreaseHintedOutlineRefCount(const THintedOutlineId& aOutlineId, TInt aSessionHandle); |
|
355 TInt FindUnhintedOutlineInCache(const TUnhintedOutlineId& aOutlineId, TAny*& aData, |
|
356 TInt &aLength); |
|
357 TInt FindHintedOutlineInCache(const THintedOutlineId& aOutlineId, TAny*& aData, TInt& aLength); |
|
358 void CleanupCacheOnOpenFontRemoval(COpenFont* aFont); |
|
359 void CleanupCacheOnOpenFontFileRemoval(COpenFontFile* aFontFile); |
|
360 |
323 private: |
361 private: |
324 CFontStore(RHeap* aHeap); |
362 CFontStore(RHeap* aHeap); |
325 void ConstructL(); |
363 void ConstructL(); |
326 void InternalizeFontStoreFileL(CFontStoreFile* aFontStoreFile, TInt aFontVersion); |
364 void InternalizeFontStoreFileL(CFontStoreFile* aFontStoreFile, TInt aFontVersion); |
327 TTypeface* GetNearestTypeface(const TTypeface& aTypeface) const; |
365 TTypeface* GetNearestTypeface(const TTypeface& aTypeface) const; |
380 CArrayPtrFlat<CFontStoreFile> iFontStoreFileList; |
418 CArrayPtrFlat<CFontStoreFile> iFontStoreFileList; |
381 CArrayPtrFlat<TTypeface> iTypefaceList; |
419 CArrayPtrFlat<TTypeface> iTypefaceList; |
382 CArrayPtrFlat<CFontBitmap> iFontBitmapList; |
420 CArrayPtrFlat<CFontBitmap> iFontBitmapList; |
383 CArrayFixFlat<TTypefaceFontBitmap> iTypefaceFontBitmapList; |
421 CArrayFixFlat<TTypefaceFontBitmap> iTypefaceFontBitmapList; |
384 CArrayPtrFlat<COpenFontFile> iOpenFontFileList; |
422 CArrayPtrFlat<COpenFontFile> iOpenFontFileList; |
385 TInt iReserved[6]; // keep iDefaultBitmapType at the correct offset |
423 TInt iReserved[2]; // keep iDefaultBitmapType at the correct offset |
|
424 CFontTableCache *iFontTableCache; |
|
425 CUnhintedOutlineCache *iUnhintedOutlineCache; |
|
426 CHintedOutlineCache *iHintedOutlineCache; |
|
427 TFontTableGlyphOutlineCacheMemMonitor *iCacheMemMon; |
386 CArrayPtrFlat<COpenFontRasterizer> iOpenFontRasterizerList; |
428 CArrayPtrFlat<COpenFontRasterizer> iOpenFontRasterizerList; |
387 COpenFontSessionCacheList* iOpenFontSessionCacheList; |
429 COpenFontSessionCacheList* iOpenFontSessionCacheList; |
388 TInt iOpenFontUid; |
430 TInt iOpenFontUid; |
389 TGlyphBitmapType iDefaultBitmapType; |
431 TGlyphBitmapType iDefaultBitmapType; |
390 CArrayPtrFlat<CShaperFactory> iShaperFactoryList; |
432 CArrayPtrFlat<CShaperFactory> iShaperFactoryList; |