ADi-FontEngine  1.0
PDF Optimized FontEngine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FontEngineCache.h
Go to the documentation of this file.
1 // FontEngine/FontEngineCache.h
2 //
3 // Copyright 2012 - Andreas Dippe
4 //
5 // This file is part of ADi-FontEngine, 2012
6 //-----------------------------------------------------------------------------
7 
8 #ifndef _FONTENGINECACHE_H_
9 #define _FONTENGINECACHE_H_
10 
11 #include "FontEngine/FontEngine.h"
15 
16 #include <set>
17 #include <vector>
18 #include <fstream>
19 #include <iomanip>
20 #include <map>
21 #include <ctime>
22 
23 #include "boost/shared_ptr.hpp"
24 
25 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
27 
28 namespace FontEngine
29 {
30 
31  /*! \brief The main font cache data struct
32  */
33  struct TCacheItem
34  {
35  //! the selector enum to define data bank search indices
37  {
38  ecsPath //!< the font file path
39  , ecsName //!< the first font name
40  , ecsFamilyName //!< the font family name
41  , ecsType //!< the font type
42 
44  };
45  //-----------------------------------------------------------------------------
46  //-----------------------------------------------------------------------------
49  typedef std::set< TCharCode, TUNiDataEval > TUnicodeSet;
51  typedef std::set< TUnicodeRange, TUNiDataRangeEval > TUnicodeRangeSet;
52  typedef std::set< unsigned short > TCIDSet;
53  //-----------------------------------------------------------------------------
54  //! ctor default
56  : _index( 0)
57  , _modDate( 0)
58  , _type( TFont::eftUnknown)
59  , _numOfGlyphs( 0)
60  , _supplement( 0)
61  {}
62  //-----------------------------------------------------------------------------
63  /*! \brief callback comparison function to sort TCacheItem into the data bank class
64  \param ci1 the first cache item
65  \param ci2 the second cache item
66  \param sel the sort selector
67  \return true if ci1 < ci2, depends from sel
68  */
69  bool operator()( const TCacheItem & ci1, const TCacheItem & ci2, ECSelector sel) const
70  {
71  switch( sel) {
72  case ecsPath: return ci1._fpath < ci2._fpath;
73  case ecsName: return ci1._fd._fontname < ci2._fd._fontname;
74  case ecsFamilyName: return ci1._fd._fontfamily < ci2._fd._fontfamily;
75  case ecsType: return ci1._type < ci2._type;
76  default: FontEngine_Assert( false); break;
77  }
78  return false;
79  }
80  //-----------------------------------------------------------------------------
81  /*! \brief callback functon called by data bank class before insert an item
82  \param ci the cache item to insert
83  \param sel the sort selector
84  \return one of the EDBCompActionRes values to set insert action
85  */
87  {
88  (void)ci; (void)sel; // to avoid compiler warnings
89  return edbaInsertAlways;
90  }
91  //-----------------------------------------------------------------------------
92  TPath _fpath; //<! the font file path
93  unsigned int _index; //<! the font index if file is a font collection or cid font
94  std::time_t _modDate; //<! the file last modification date
95  EFType _type; //<! the font type, see EFType
96  TFontDictionary _fd; //<! the FontDescriptor instance, see TFontDictionary
97  unsigned int _numOfGlyphs; //<! the number of glyphs
98  TUnicodeSet _unicodes; //<! a set of single unicodes, the font contains
99  TUnicodeRangeSet _unicodeRanges; //<! a set of unicode ranges, the font contains
100  TAltNameSet _altnameset; //<! a set of alternate font names
101  std::string _registry; //<! the Registry string if a CIDSystemInfo is present
102  std::string _ordering; //<! the Ordering string if a CIDSystemInfo is present
103  int _supplement; //<! the Supplenent number if a CIDSystemInfo is present
104  TCIDSet _cidset; //<! a set of cid's (Character Collection Id) in cid fonts
105  };
106  //-----------------------------------------------------------------------------
107  //! The type declaration of main font cache data base
109  //-----------------------------------------------------------------------------
110  //-----------------------------------------------------------------------------
111  //! the font cache class
112  //-----------------------------------------------------------------------------
114  {
120  typedef std::pair<TCacheDBankCIT, TCacheDBankCIT> TCacheDBankRes;
122  typedef std::multimap<std::string, TCacheDBankIdx> TAltNameRefMMap;
123  typedef TAltNameRefMMap::const_iterator TAltNameRefMMapCIT;
124  typedef std::pair<TAltNameRefMMapCIT, TAltNameRefMMapCIT> TAltNameRefMMapR;
125  //-----------------------------------------------------------------------------
126  //-----------------------------------------------------------------------------
127  //! the font cache search iterator class
129  {
130  friend struct TFontCache;
131  //-----------------------------------------------------------------------------
132  /*! \brief ctor
133  \param fcache a font cache instance
134  \param fname to search into the alternate name set of whole font cache
135  */
136  TSearchIterator( const TFontCache & fcache, const std::string & fname)
137  : _fcache( fcache)
138  , _it( _fcache._altNameRefMMap.equal_range( fname))
139  {}
140  //-----------------------------------------------------------------------------
141  /*! \brief function to find nearest font in the alternate name set of whole font cache
142  \return a pointer to nearest font or NULL if no such item exsists
143  */
144  const TCacheItem* near_by() const
145  {
146  return (_fcache._altNameRefMMap.end() != _it.first) ? &_fcache._fcachedb[(*_it.first).second] : NULL;
147  }
148  //-----------------------------------------------------------------------------
149  /*! \brief reference operator to get font cache item. Iterator must be valid check with operator bool() first
150  \return font cache item
151  */
152  const TCacheItem & operator*() const
153  {
154  ThrowFontEngineException( (_it.second != _it.first) && (*_it.first).second < _fcache._fcachedb.size(), efccInvalidIterator);
155  return _fcache._fcachedb[(*_it.first).second];
156  }
157  //-----------------------------------------------------------------------------
158  /*! \brief function to chack if iterator is valid
159  \return true if iterator is valid and a item was found
160  */
161  operator bool() const
162  {
163  return (_it.second != _it.first);
164  }
165  //-----------------------------------------------------------------------------
166  private:
167  const TFontCache & _fcache; //!< the font cache instance
168  mutable TAltNameRefMMapR _it; //!< internal iterator to multi map keep alternate name set
169  };
170  //-----------------------------------------------------------------------------
171  //-----------------------------------------------------------------------------
174  //-----------------------------------------------------------------------------
175  //-----------------------------------------------------------------------------
176  //! the abstract font cache progress bar class
177  struct TProgress
178  {
179  //! virtual dtor
180  virtual ~TProgress()
181  {}
182  //-----------------------------------------------------------------------------
183  /*! \brief pure virtual operator function call by process to inform about progress
184  \param cacheitem the current cache item, only some items will be reported by progress function
185  \return false to stop further process otherwise true
186  */
187  virtual bool operator()( const TCacheItem & cacheitem) const = 0;
188  };
189  //-----------------------------------------------------------------------------
190  //-----------------------------------------------------------------------------
191  /*! \brief ctor
192  \param ppm parameter map, see description at TPathParamMap
193  */
194  TFontCache( const TPathParamMap & ppm)
195  : _pathParamMap( ppm)
196  , _binaer( true)
197  {}
198  //-----------------------------------------------------------------------------
199  /*! \brief return the current write mode
200  \return true if the font cache was saved in binary format else a readable text format is used
201  */
202  bool isBinaerFormat() const
203  {
204  return _binaer;
205  }
206  //-----------------------------------------------------------------------------
207  /*! \brief return the size state
208  \return true if the font cache is empty
209  */
210  bool empty() const
211  {
212  return _fcachedb.empty();
213  }
214  //-----------------------------------------------------------------------------
215  /*! \brief return the size, this is the number of all font cache items include all non-font files
216  \return the font cache size
217  */
218  unsigned int size() const
219  {
220  return _fcachedb.size();
221  }
222  //-----------------------------------------------------------------------------
223  /*! \brief return the current parameter map, see description at TPathParamMap
224  \return parameter map
225  */
227  {
228  return _pathParamMap;
229  }
230  //-----------------------------------------------------------------------------
231  /*! \brief return the font cache item from index, be sure that enough items present in font cache
232  \param idx the font cache item index
233  \return font cache item from index
234  */
235  const TCacheItem & operator[]( unsigned int idx) const
236  {
237  ThrowFontEngineException( idx < _fcachedb.size(), efccIndexInvalid);
238  return _fcachedb[idx];
239  }
240  //-----------------------------------------------------------------------------
241  /*! \brief reset the font cache will clear all items
242  \param ppm parameter map pointer, see description at TPathParamMap
243  */
244  void reset( const TPathParamMap* ppm = NULL)
245  {
246  _fcachedb.clear();
247  if( NULL != ppm)
248  _pathParamMap = *ppm;
249  _binaer = true;
250  }
251  //-----------------------------------------------------------------------------
252  /*! \brief create font cache from different search pathes. The function will first clear the current font cache data
253  \param searchPath a vector of folder to search fonts
254  \param multi_thread true to allow creating of font cache with many threads
255  \param prog a progress callback function, see TProgress
256  */
257  void create( const TPathVec & searchPath, bool multi_thread, const TProgress* prog = NULL);
258  //-----------------------------------------------------------------------------
259  /*! \brief update font cache from different search pathes.
260  \param searchPath a vector of folder to search fonts
261  \param multi_thread true to allow updating of font cache with many threads
262  \param prog a progress callback function, see TProgress
263  */
264  void update( const TPathVec & searchPath, bool multi_thread, const TProgress* prog = NULL);
265  //-----------------------------------------------------------------------------
266  /*! \brief find specific font in font cache with file path.
267  \param fpath the file path
268  \return a pair of TCacheDBankCIT, if both iterators equal no item could be found, else you can increment first while first and second are unequal.
269  */
270  TCacheDBankRes findFontFile( const TPath & fpath) const
271  {
272  TCacheItem cacheitem;
273 
274  cacheitem._fpath = fpath;
275  return TCacheDBankRes( _fcachedb.lower_bound( cacheitem, TCacheItem::ecsPath), _fcachedb.upper_bound( cacheitem, TCacheItem::ecsPath));
276  }
277  //-----------------------------------------------------------------------------
278 // // parameter fname must be UTF-8 encoded
279 // const TCacheItem* findFontByName( const std::string & fname, TFont::EFType ftype = TFont::eftUnknown, bool alternate = false) const
280 // {
281 // TCacheItem cacheitem;
282 //
283 // cacheitem._fd._fontname = fname;
284 // TCacheDBankCIT it( _fcachedb.lower_bound( cacheitem, TCacheItem::ecsName));
285 //
286 // for( TCacheDBankCIT eit = _fcachedb.upper_bound( cacheitem, TCacheItem::ecsName); it != eit; ++it) {
287 // if( (TFont::eftUnknown == ftype) || ((*it)._type == ftype))
288 // return &*it;
289 // }
290 // if( alternate) {
291 // it = _fcachedb.lower_bound( cacheitem, TCacheItem::ecsAltName);
292 // if( it != _fcachedb.end( TCacheItem::ecsAltName)) {
293 // for( TCacheDBankCIT eit = _fcachedb.upper_bound( cacheitem, TCacheItem::ecsAltName); it != eit; ++it) {
294 // TAltNameSet::const_iterator ait( (*it)._altnameset.find( fname));
295 //
296 // if( (ait != (*it)._altnameset.end()) && ((TFont::eftUnknown == ftype) || ((*it)._type == ftype)))
297 // return &*it;
298 // }
299 // }
300 // }
301 // return NULL;
302 // }
303  //-----------------------------------------------------------------------------
304  /*! \brief find specific font in font cache with font name
305  \param fname the primary font name to search, must be encoded asUTF-8
306  \return a pair of TCacheDBankCIT, if both iterators equal no item could be found, else you can increment first while first and second are unequal.
307  */
308  TCacheDBankRes findFontsExact( const std::string & fname) const
309  {
310  TCacheItem cacheitem;
311 
312  cacheitem._fd._fontname = fname;
313  return TCacheDBankRes( _fcachedb.lower_bound( cacheitem, TCacheItem::ecsName), _fcachedb.upper_bound( cacheitem, TCacheItem::ecsName));
314  }
315  //-----------------------------------------------------------------------------
316  /*! \brief find specific font in font cache with font family name
317  \param family the font family name to search, must be encoded asUTF-8
318  \return a pair of TCacheDBankCIT, if both iterators equal no item could be found, else you can increment first while first and second are unequal.
319  */
320  TCacheDBankRes findFontFamilyExact( const std::string & family) const
321  {
322  TCacheItem cacheitem;
323 
324  cacheitem._fd._fontfamily = family;
325  return TCacheDBankRes( _fcachedb.lower_bound( cacheitem, TCacheItem::ecsFamilyName), _fcachedb.upper_bound( cacheitem, TCacheItem::ecsFamilyName));
326  }
327  //-----------------------------------------------------------------------------
328  /*! \brief search font in font cache with font name in alternate name set. Alternate names are collected from different usefull places inside font.
329  \param fname the primary font name to search, must be encoded asUTF-8
330  \return a const_search_iterator, see TSearchIterator
331  */
332  const_search_iterator searchFirstAltFont( const std::string & fname) const
333  {
334  return const_search_iterator( *this, fname);
335  }
336  //-----------------------------------------------------------------------------
337  /*! \brief search font in font cache with font name in alternate name set. Alternate names are collected from different usefull places inside font.
338  \param sit const_search_iterator from a previous call of searchFirstAltFont(..)
339  \return true if a next iterator could be found
340  */
342  {
344  ++(sit._it.first);
345  return sit;
346  }
347  //-----------------------------------------------------------------------------
348  /*! \brief read font cache from file. The function will first clear the current font cache data
349  \param cachePath file path to font cache file to read
350  */
351  void read( const TPath & cachePath)
352  {
353 # if defined( WIN32 )
354  std::ifstream cachefile( cachePath.c_str(), std::ios::in | std::ios::binary);
355 # else // WIN32
356  std::ifstream cachefile( FontEngine::getUTF8Text( cachePath).c_str(), std::ios::in | std::ios::binary);
357 # endif // WIN32
358 
359  ThrowFontEngineException( cachefile.is_open(), efccPath);
360  read( cachefile);
361  }
362  //-----------------------------------------------------------------------------
363  /*! \brief write font cache to file.
364  \param cachePath file path to font cache file to write
365  \param binaer if true use a compact binary format else a readable text format is used. Binary format will be faster and lesser
366  */
367  void write( const TPath & cachePath, bool binaer)
368  {
369 # if defined( WIN32 )
370  std::ofstream cachefile( cachePath.c_str(), std::ios::out | std::ios::binary | std::ios::trunc);
371 # else // WIN32
372  std::ofstream cachefile( FontEngine::getUTF8Text( cachePath).c_str(), std::ios::out | std::ios::binary | std::ios::trunc);
373 # endif // WIN32
374 
375  ThrowFontEngineException( cachefile.is_open(), efccPath);
376  write( cachefile, binaer);
377  }
378  //-----------------------------------------------------------------------------
379  /*! \brief read font cache from istream. The function will first clear the current font cache data
380  \param cache istream to font cache streamm to read
381  */
382  void read( std::istream & cache);
383  //-----------------------------------------------------------------------------
384  /*! \brief write font cache to ostream.
385  \param cache ostream path to font cache streamm to write
386  \param binaer if true use a compact binary format else a readable text format is used. Binary format will be faster and lesser
387  */
388  void write( std::ostream & cache, bool binaer);
389  //-----------------------------------------------------------------------------
390  public:
391  /*! \brief helper function to normalize a font name, the function remove all character outside [a-z], [A-Z], [0-9] and <=128
392  \param utf8fname the font name to normalize, must be encoded asUTF-8
393  \return the normalized font name
394  */
395  static std::string normalizeFontName( const std::string & utf8fname);
396  //-----------------------------------------------------------------------------
397  private:
398  TPathParamMap _pathParamMap; //!< the parameter map, see description at TPathParamMap
399  TCacheDBank _fcachedb; //!< the font cache data bank
400  TAltNameRefMMap _altNameRefMMap; //!< the alternate font name set, Alternate names are collected from different usefull places inside font.
401  bool _binaer; //!< the read/write state if binary format is used
402  };
403  //-----------------------------------------------------------------------------
404  //-----------------------------------------------------------------------------
405  //! Global Font Cache instance
406  //-----------------------------------------------------------------------------
407  typedef boost::shared_ptr<TFontCache> TGlobalFontCache;
408  //-----------------------------------------------------------------------------
409  /*! \brief get a global singleton font cache instance
410  \param ppm parameter map, see description at TPathParamMap
411  \return a singleton font cache instance
412  */
414  //-----------------------------------------------------------------------------
415  /*! \brief release this global singleton font cache instance
416  */
418 
419 } // namespace FontEngine
420 
421 #endif // _FONTENGINECACHE_H_
422 //-----------------------------------------------------------------------------
423 /*!\history
424 ** ADi-2012-12-14: creation
425 ** HTh-2013-01-07: implement missing functions for unix
426 ** ADi-2013-01-25: functions TFontCache::read(..) and TFontCache::write(..) should use utf8 pathes on mac and linux
427 ** ADi-2013-04-11: set export macro in function globalFontCache(..) and globalFontCacheRelease()
428 ** ADi-2013-04-23: add normalizeFontName(..) and rename searchFirstFont(..) and searchNextFont(..) to searchFirstAltFont(..) and searchNextAltFont(..)
429 ** ADi-2013-05-31: add function near_by()
430 ** ADi-2013-06-25: add function getPathParamMap()
431 ** ADi-2013-07-08: add function findFontFamilyExact(..)
432 ** ADi-2013-10-07: add function cacheSVG(..)
433 ** ADi-2013-11-18: correct doxygen comments
434 */
FONTENGINE_EXPORTS std::string getUTF8Text(const std::wstring &text)
get utf8 encoded unicode string from wstring
TCacheItem::TUnicodeRange TUnicodeRange
Definition: FontEngineCache.h:116
ECSelector
the selector enum to define data bank search indices
Definition: FontEngineCache.h:36
const_search_iterator searchFirstAltFont(const std::string &fname) const
search font in font cache with font name in alternate name set. Alternate names are collected from di...
Definition: FontEngineCache.h:332
void write(const TPath &cachePath, bool binaer)
write font cache to file.
Definition: FontEngineCache.h:367
bool empty() const
return the size state
Definition: FontEngineCache.h:210
the abstract font cache progress bar class
Definition: FontEngineCache.h:177
The primary font class with short sample to open font and get glyph information:
Definition: FontEngine.h:123
EDBCompActionRes
The insert action enum, to set data bank behavior if a item will be inserted, modified or imported...
Definition: FontEngineDBank.h:25
FontEngine::TPathVec TPathVec
Definition: FontEngineCache.h:115
const TCacheItem & operator*() const
reference operator to get font cache item. Iterator must be valid check with operator bool() first ...
Definition: FontEngineCache.h:152
TPath _fpath
Definition: FontEngineCache.h:92
(5001) font cache - Cache file could not open
Definition: FontEngineError.h:141
TSearchIterator search_iterator
Definition: FontEngineCache.h:172
TCacheDBankRes findFontFile(const TPath &fpath) const
find specific font in font cache with file path.
Definition: FontEngineCache.h:270
TRange< TCharCode > TUnicodeRange
Definition: FontEngineCache.h:50
TCIDSet _cidset
Definition: FontEngineCache.h:104
TAltNameSet _altnameset
Definition: FontEngineCache.h:100
std::map< std::string, FontEngine::TPath > TPathParamMap
Definition: FontEngine.h:33
TUnicodeRangeSet _unicodeRanges
Definition: FontEngineCache.h:99
bool operator()(const TCacheItem &ci1, const TCacheItem &ci2, ECSelector sel) const
callback comparison function to sort TCacheItem into the data bank class
Definition: FontEngineCache.h:69
std::string _fontname
UTF-8 encoded; the font name.
Definition: FontEngineTypes.h:506
TCacheDBankRes findFontsExact(const std::string &fname) const
find specific font in font cache with font name
Definition: FontEngineCache.h:308
std::string _fontfamily
UTF-8 encoded; the font family name.
Definition: FontEngineTypes.h:507
bool searchNextAltFont(const_search_iterator &sit) const
search font in font cache with font name in alternate name set. Alternate names are collected from di...
Definition: FontEngineCache.h:341
contain font properties, derived from PDF format, see also FontDescriptor http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
Definition: FontEngineTypes.h:491
the font file path
Definition: FontEngineCache.h:38
const TSearchIterator const_search_iterator
Definition: FontEngineCache.h:173
TDBank< TCacheItem, TCacheItem::ECSelector, TCacheItem::ecsLastSelector, TCacheItem > TCacheDBank
The type declaration of main font cache data base.
Definition: FontEngineCache.h:108
unsigned int size() const
return the size, this is the number of all font cache items include all non-font files ...
Definition: FontEngineCache.h:218
std::vector< TPath > TPathVec
Definition: FontEngineTypes.h:36
unsigned int _index
Definition: FontEngineCache.h:93
TUnicodeSet _unicodes
Definition: FontEngineCache.h:98
TFont::EFType EFType
Definition: FontEngineCache.h:47
TCacheItem()
ctor default
Definition: FontEngineCache.h:55
(5005) font cache - The search iterator is invalid
Definition: FontEngineError.h:145
const TPathParamMap & getPathParamMap() const
return the current parameter map, see description at TPathParamMap
Definition: FontEngineCache.h:226
const TCacheItem * near_by() const
function to find nearest font in the alternate name set of whole font cache
Definition: FontEngineCache.h:144
TCacheDBank::TDataIndex TCacheDBankIdx
Definition: FontEngineCache.h:121
Definition: FontEngineCache.h:43
std::pair< TCacheDBankCIT, TCacheDBankCIT > TCacheDBankRes
Definition: FontEngineCache.h:120
std::time_t _modDate
Definition: FontEngineCache.h:94
the font cache class
Definition: FontEngineCache.h:113
Definition: FontEngineTCode.h:432
std::vector< TUNiValue > TUNiData
Definition: FontEngineTCode.h:47
bool isBinaerFormat() const
return the current write mode
Definition: FontEngineCache.h:202
EFType
possible font types
Definition: FontEngine.h:129
always insert the item, allow duplicates of same item
Definition: FontEngineDBank.h:27
(5006) font cache - index is invalid
Definition: FontEngineError.h:146
TFontDictionary _fd
Definition: FontEngineCache.h:96
void FontEngine_Assert(bool expr)
function to check program process no excption raise
Definition: FontEngineError.h:200
EFType _type
Definition: FontEngineCache.h:95
The main font cache data struct.
Definition: FontEngineCache.h:33
std::wstring TPath
Definition: FontEngineTypes.h:35
virtual ~TProgress()
virtual dtor
Definition: FontEngineCache.h:180
std::pair< TAltNameRefMMapCIT, TAltNameRefMMapCIT > TAltNameRefMMapR
Definition: FontEngineCache.h:124
TSearchIterator(const TFontCache &fcache, const std::string &fname)
ctor
Definition: FontEngineCache.h:136
TCharCode::TUNiData TUNiData
Definition: FontEngineCache.h:48
void ThrowFontEngineException(bool expr, EErrorCodes errcode, bool dbg_break=true)
function to raise FontEngine exception
Definition: FontEngineError.h:169
std::set< TCharCode, TUNiDataEval > TUnicodeSet
Definition: FontEngineCache.h:49
TCacheDBankRes findFontFamilyExact(const std::string &family) const
find specific font in font cache with font family name
Definition: FontEngineCache.h:320
std::set< TUnicodeRange, TUNiDataRangeEval > TUnicodeRangeSet
Definition: FontEngineCache.h:51
unsigned int _numOfGlyphs
Definition: FontEngineCache.h:97
TCacheItem::TCIDSet TCIDSet
Definition: FontEngineCache.h:117
FONTENGINE_EXPORTS void globalFontCacheRelease()
release this global singleton font cache instance
the font type
Definition: FontEngineCache.h:41
void reset(const TPathParamMap *ppm=NULL)
reset the font cache will clear all items
Definition: FontEngineCache.h:244
std::set< std::string > TAltNameSet
Definition: FontEngineTypes.h:37
const TCacheItem & operator[](unsigned int idx) const
return the font cache item from index, be sure that enough items present in font cache ...
Definition: FontEngineCache.h:235
#define FONTENGINE_EXPORTS
Definition: FontEngineDLL.h:20
std::string _registry
Definition: FontEngineCache.h:101
void read(const TPath &cachePath)
read font cache from file. The function will first clear the current font cache data ...
Definition: FontEngineCache.h:351
boost::shared_ptr< TFontCache > TGlobalFontCache
Global Font Cache instance.
Definition: FontEngineCache.h:407
the first font name
Definition: FontEngineCache.h:39
FONTENGINE_EXPORTS TGlobalFontCache globalFontCache(const TPathParamMap &ppm)
get a global singleton font cache instance
the font cache search iterator class
Definition: FontEngineCache.h:128
std::string _ordering
Definition: FontEngineCache.h:102
TAltNameRefMMap::const_iterator TAltNameRefMMapCIT
Definition: FontEngineCache.h:123
EDBCompActionRes operator()(const TCacheItem &ci, ECSelector sel) const
callback functon called by data bank class before insert an item
Definition: FontEngineCache.h:86
std::multimap< std::string, TCacheDBankIdx > TAltNameRefMMap
Definition: FontEngineCache.h:122
TCacheDBank::iterator TCacheDBankIT
Definition: FontEngineCache.h:118
TCacheDBank::const_iterator TCacheDBankCIT
Definition: FontEngineCache.h:119
int _supplement
Definition: FontEngineCache.h:103
TFontCache(const TPathParamMap &ppm)
ctor
Definition: FontEngineCache.h:194
std::set< unsigned short > TCIDSet
Definition: FontEngineCache.h:52
the font family name
Definition: FontEngineCache.h:40
InsideFont and ADI-FontEngine : Andreas Dippe, © 2013
http://www.insidefont.de