1 /* 2 ********************************************************************** 3 * Copyright (C) 2003-2008, International Business Machines 4 * Corporation and others. All Rights Reserved. 5 ********************************************************************** 6 */ 7 8 #ifndef __FONTTABLECACHE_H 9 10 #define __FONTTABLECACHE_H 11 12 #include "layout/LETypes.h" 13 14 struct FontTableCacheEntry; 15 16 class FontTableCache 17 { 18 public: 19 FontTableCache(); 20 21 virtual ~FontTableCache(); 22 23 const void *find(LETag tableTag) const; 24 25 protected: 26 virtual const void *readFontTable(LETag tableTag) const = 0; 27 virtual void freeFontTable(const void *table) const; 28 29 private: 30 31 void add(LETag tableTag, const void *table); 32 33 FontTableCacheEntry *fTableCache; 34 le_int32 fTableCacheCurr; 35 le_int32 fTableCacheSize; 36 }; 37 38 #endif 39 40