FontTableCache.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. *************************************************************************
  3. * © 2016 and later: Unicode, Inc. and others.
  4. * License & terms of use: http://www.unicode.org/copyright.html#License
  5. *************************************************************************
  6. **********************************************************************
  7. * Copyright (C) 2003-2008, International Business Machines
  8. * Corporation and others. All Rights Reserved.
  9. **********************************************************************
  10. */
  11. #ifndef __FONTTABLECACHE_H
  12. #define __FONTTABLECACHE_H
  13. #include "layout/LETypes.h"
  14. struct FontTableCacheEntry;
  15. class FontTableCache
  16. {
  17. public:
  18. FontTableCache();
  19. virtual ~FontTableCache();
  20. const void *find(LETag tableTag) const;
  21. protected:
  22. virtual const void *readFontTable(LETag tableTag) const = 0;
  23. virtual void freeFontTable(const void *table) const;
  24. private:
  25. void add(LETag tableTag, const void *table);
  26. FontTableCacheEntry *fTableCache;
  27. le_int32 fTableCacheCurr;
  28. le_int32 fTableCacheSize;
  29. };
  30. #endif