]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
b75a7d8f A |
3 | /* |
4 | ********************************************************************** | |
57a6839d | 5 | * Copyright (C) 2003-2013, International Business Machines |
b75a7d8f A |
6 | * Corporation and others. All Rights Reserved. |
7 | ********************************************************************** | |
8 | */ | |
9 | ||
10 | #ifndef __FONTTABLECACHE_H | |
11 | ||
12 | #define __FONTTABLECACHE_H | |
13 | ||
14 | #include "layout/LETypes.h" | |
15 | ||
46f4442e A |
16 | U_NAMESPACE_USE |
17 | ||
b75a7d8f A |
18 | struct FontTableCacheEntry; |
19 | ||
20 | class FontTableCache | |
21 | { | |
22 | public: | |
23 | FontTableCache(); | |
24 | ||
25 | virtual ~FontTableCache(); | |
26 | ||
57a6839d | 27 | const void *find(LETag tableTag, size_t &length) const; |
b75a7d8f A |
28 | |
29 | protected: | |
57a6839d | 30 | virtual const void *readFontTable(LETag tableTag, size_t &length) const = 0; |
46f4442e | 31 | virtual void freeFontTable(const void *table) const; |
b75a7d8f A |
32 | |
33 | private: | |
34 | ||
57a6839d | 35 | void add(LETag tableTag, const void *table, size_t length); |
b75a7d8f A |
36 | |
37 | FontTableCacheEntry *fTableCache; | |
38 | le_int32 fTableCacheCurr; | |
39 | le_int32 fTableCacheSize; | |
40 | }; | |
41 | ||
42 | #endif | |
43 |