clear cache when locale is changed
[platform/core/uifw/dali-adaptor.git] / dali / internal / text / text-abstraction / font-client-plugin-impl.h
1 #ifndef DALI_INTERNAL_TEXT_ABSTRACTION_FONT_CLIENT_PLUGIN_IMPL_H
2 #define DALI_INTERNAL_TEXT_ABSTRACTION_FONT_CLIENT_PLUGIN_IMPL_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/devel-api/text-abstraction/bitmap-font.h>
23 #include <dali/devel-api/text-abstraction/font-metrics.h>
24 #include <dali/devel-api/text-abstraction/glyph-info.h>
25 #include <dali/internal/text/text-abstraction/font-client-impl.h>
26 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
27
28 #ifdef ENABLE_VECTOR_BASED_TEXT_RENDERING
29 #include <dali/internal/text/glyphy/vector-font-cache.h>
30 #else
31 class VectorFontCache;
32 #endif
33
34 // EXTERNAL INCLUDES
35 #include <ft2build.h>
36 #include FT_FREETYPE_H
37 #include FT_GLYPH_H
38 #include FT_OUTLINE_H
39 #include FT_STROKER_H
40 #include FT_SYNTHESIS_H
41
42 // forward declarations of font config types.
43 struct _FcCharSet;
44 struct _FcFontSet;
45 struct _FcPattern;
46
47 namespace Dali
48 {
49
50 namespace TextAbstraction
51 {
52
53 namespace Internal
54 {
55
56 /**
57  * @brief Type used for indices addressing the vector with front descriptions of validated fonts.
58  */
59 typedef uint32_t FontDescriptionId;
60
61 /**
62  * @brief Type used for indices addressing the vector with pixel buffers.
63  */
64 typedef uint32_t PixelBufferId;
65
66 /**
67  * @brief Vector of character sets.
68  */
69 typedef Vector<_FcCharSet*> CharacterSetList;
70
71 /**
72  * @brief FontClient implementation.
73  */
74 struct FontClient::Plugin
75 {
76   struct FontIdCacheItem
77   {
78     FontDescription::Type type; ///< The type of font.
79     FontId                id;   ///< Index to the cache of fonts for the specified type.
80   };
81
82   /**
83    * @brief Caches an list of fallback fonts for a given font-description
84    */
85   struct FallbackCacheItem
86   {
87     FallbackCacheItem( FontDescription&& fontDescription, FontList* fallbackFonts, CharacterSetList* characterSets );
88
89     FontDescription fontDescription; ///< The font description.
90     FontList* fallbackFonts;         ///< The list of fallback fonts for the given font-description.
91     CharacterSetList* characterSets; ///< The list of character sets for the given font-description.
92   };
93
94   /**
95    * @brief Caches an index to the vector of font descriptions for a given font.
96    */
97   struct FontDescriptionCacheItem
98   {
99     FontDescriptionCacheItem( const FontDescription& fontDescription,
100                               FontDescriptionId index );
101     FontDescriptionCacheItem( FontDescription&& fontDescription,
102                               FontDescriptionId index );
103
104     FontDescription fontDescription; ///< The font description.
105     FontDescriptionId index;         ///< Index to the vector of font descriptions.
106   };
107
108   /**
109    * @brief Caches the font id of the pair font point size and the index to the vector of font descriptions of validated fonts.
110    */
111   struct FontDescriptionSizeCacheItem
112   {
113     FontDescriptionSizeCacheItem( FontDescriptionId validatedFontId,
114                                   PointSize26Dot6 requestedPointSize,
115                                   FontId fontId );
116
117     FontDescriptionId validatedFontId;    ///< Index to the vector with font descriptions.
118     PointSize26Dot6   requestedPointSize; ///< The font point size.
119     FontId            fontId;             ///< The font identifier.
120   };
121
122   /**
123    * @brief Caches the FreeType face and font metrics of the triplet 'path to the font file name, font point size and face index'.
124    */
125   struct FontFaceCacheItem
126   {
127     FontFaceCacheItem( FT_Face ftFace,
128                        const FontPath& path,
129                        PointSize26Dot6 requestedPointSize,
130                        FaceIndex face,
131                        const FontMetrics& metrics );
132
133     FontFaceCacheItem( FT_Face ftFace,
134                        const FontPath& path,
135                        PointSize26Dot6 requestedPointSize,
136                        FaceIndex face,
137                        const FontMetrics& metrics,
138                        int fixedSizeIndex,
139                        float fixedWidth,
140                        float fixedHeight,
141                        bool hasColorTables );
142
143     FT_Face mFreeTypeFace;               ///< The FreeType face.
144     FontPath mPath;                      ///< The path to the font file name.
145     PointSize26Dot6 mRequestedPointSize; ///< The font point size.
146     FaceIndex mFaceIndex;                ///< The face index.
147     FontMetrics mMetrics;                ///< The font metrics.
148     _FcCharSet* mCharacterSet;           ///< Pointer with the range of characters.
149     int mFixedSizeIndex;                 ///< Index to the fixed size table for the requested size.
150     float mFixedWidthPixels;             ///< The height in pixels (fixed size bitmaps only)
151     float mFixedHeightPixels;            ///< The height in pixels (fixed size bitmaps only)
152     unsigned int mVectorFontId;          ///< The ID of the equivalent vector-based font
153     FontId mFontId;                      ///< Index to the vector with the cache of font's ids.
154     bool mIsFixedSizeBitmap : 1;         ///< Whether the font has fixed size bitmaps.
155     bool mHasColorTables    : 1;         ///< Whether the font has color tables.
156   };
157
158   struct EllipsisItem
159   {
160     PointSize26Dot6 requestedPointSize;
161     GlyphInfo glyph;
162   };
163
164  /**
165   * @brief Caches pixel buffers.
166   */
167  struct PixelBufferCacheItem
168  {
169    Devel::PixelBuffer pixelBuffer; ///< The pixel buffer loaded from the url.
170    std::string url;                ///< The url.
171  };
172
173   /**
174    * @brief Caches embedded items.
175    */
176  struct EmbeddedItem
177  {
178    PixelBufferId pixelBufferId; ///< Index to the vector of pixel buffers
179    unsigned int width;          ///< The desired width.
180    unsigned int height;         ///< The desired height.
181  };
182
183  /**
184   * @brief Stores a bitmap font and its pixel buffers per glyph.
185   */
186  struct BitmapFontCacheItem
187  {
188    BitmapFont font;                              ///< The bitmap font.
189    std::vector<Devel::PixelBuffer> pixelBuffers; ///< The pixel buffers of the glyphs.
190    FontId id;                                    ///< Index to the vector with the cache of font's ids.
191  };
192
193   /**
194    * Constructor.
195    *
196    * Initializes the FreeType library.
197    * Initializes the dpi values.
198    *
199    * @param[in] horizontalDpi The horizontal dpi.
200    * @param[in] verticalDpi The vertical dpi.
201    */
202   Plugin( unsigned int horizontalDpi, unsigned int verticalDpi );
203
204   /**
205    * Default destructor.
206    *
207    * Frees any allocated resource.
208    */
209   ~Plugin();
210
211   /**
212    * @copydoc Dali::TextAbstraction::FontClient::ClearCache()
213    */
214   void ClearCache();
215
216   /**
217    * @copydoc Dali::TextAbstraction::FontClient::SetDpi()
218    */
219   void SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi );
220
221   /**
222    * @copydoc Dali::TextAbstraction::FontClient::ResetSystemDefaults()
223    */
224   void ResetSystemDefaults();
225
226   /**
227    * @copydoc Dali::TextAbstraction::FontClient::SetDefaultFont()
228    */
229   void SetDefaultFont( const FontDescription& preferredFontDescription );
230
231   /**
232    * @copydoc Dali::TextAbstraction::FontClient::GetDefaultPlatformFontDescription()
233    */
234   void GetDefaultPlatformFontDescription( FontDescription& fontDescription );
235
236   /**
237    * @copydoc Dali::TextAbstraction::FontClient::GetDefaultFonts()
238    */
239   void GetDefaultFonts( FontList& defaultFonts );
240
241   /**
242    * @copydoc Dali::TextAbstraction::FontClient::GetSystemFonts()
243    */
244   void GetSystemFonts( FontList& systemFonts );
245
246   /**
247    * @copydoc Dali::TextAbstraction::FontClient::GetDescription()
248    */
249   void GetDescription( FontId id, FontDescription& fontDescription ) const;
250
251   /**
252    * @copydoc Dali::TextAbstraction::FontClient::GetPointSize()
253    */
254   PointSize26Dot6 GetPointSize( FontId id );
255
256   /**
257    * @copydoc Dali::TextAbstraction::FontClient::IsCharacterSupportedByFont()
258    */
259   bool IsCharacterSupportedByFont( FontId fontId, Character character );
260
261   /**
262    * @brief Finds within the @p fontList a font which support the @p carcode.
263    *
264    * @param[in] fontList A list of font paths, family, width, weight and slant.
265    * @param[in] characterSetList A list that contains a character set for each description of the font list.
266    * @param[in] charcode The character for which a font is needed.
267    * @param[in] requestedPointSize The point size in 26.6 fractional points.
268    * @param[in] preferColor @e true if a color font is preferred.
269    *
270    * @return A valid font identifier, or zero if no font is found.
271    */
272   FontId FindFontForCharacter( const FontList& fontList,
273                                const CharacterSetList& characterSetList,
274                                Character charcode,
275                                PointSize26Dot6 requestedPointSize,
276                                bool preferColor );
277
278   /**
279    * @copydoc Dali::TextAbstraction::FontClient::FindDefaultFont()
280    */
281   FontId FindDefaultFont( Character charcode,
282                           PointSize26Dot6 requestedPointSize,
283                           bool preferColor );
284
285   /**
286    * @copydoc Dali::TextAbstraction::FontClient::FindFallbackFont()
287    */
288   FontId FindFallbackFont( Character charcode,
289                            const FontDescription& preferredFontDescription,
290                            PointSize26Dot6 requestedPointSize,
291                            bool preferColor );
292
293   /**
294    * @see Dali::TextAbstraction::FontClient::GetFontId( const FontPath& path, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex )
295    *
296    * @param[in] cacheDescription Whether to cache the font description.
297    */
298   FontId GetFontId( const FontPath& path,
299                     PointSize26Dot6 requestedPointSize,
300                     FaceIndex faceIndex,
301                     bool cacheDescription );
302
303   /**
304    * @copydoc Dali::TextAbstraction::FontClient::GetFontId( const FontDescription& preferredFontDescription, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex )
305    */
306   FontId GetFontId( const FontDescription& fontDescription,
307                     PointSize26Dot6 requestedPointSize,
308                     FaceIndex faceIndex );
309
310   /**
311    * @copydoc Dali::TextAbstraction::FontClient::GetFontId( const BitmapFont& bitmapFont )
312    */
313   FontId GetFontId( const BitmapFont& bitmapFont );
314
315   /**
316    * @copydoc Dali::TextAbstraction::FontClient::IsScalable( const FontPath& path )
317    */
318   bool IsScalable( const FontPath& path );
319
320   /**
321    * @copydoc Dali::TextAbstraction::FontClient::IsScalable( const FontDescription& fontDescription )
322    */
323   bool IsScalable( const FontDescription& fontDescription );
324
325   /**
326    * @copydoc Dali::TextAbstraction::FontClient::GetFixedSizes()
327    */
328   void GetFixedSizes( const FontPath& path, Dali::Vector< PointSize26Dot6>& sizes );
329
330   /**
331    * @copydoc Dali::TextAbstraction::FontClient::GetFixedSizes()
332    */
333   void GetFixedSizes( const FontDescription& fontDescription,
334                       Dali::Vector< PointSize26Dot6 >& sizes );
335
336   /**
337    * @copydoc Dali::TextAbstraction::FontClient::HasItalicStyle()
338    */
339   bool HasItalicStyle( FontId fontId ) const;
340
341   /**
342    * @copydoc Dali::TextAbstraction::FontClient::GetFontMetrics()
343    */
344   void GetFontMetrics( FontId fontId, FontMetrics& metrics );
345
346   /**
347    * @copydoc Dali::TextAbstraction::FontClient::GetGlyphIndex()
348    */
349   GlyphIndex GetGlyphIndex( FontId fontId, Character charcode );
350
351   /**
352    * @copydoc Dali::TextAbstraction::FontClient::GetGlyphMetrics()
353    */
354   bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal );
355
356   /**
357    * Helper for GetGlyphMetrics when using bitmaps
358    */
359   bool GetBitmapMetrics( GlyphInfo* array, uint32_t size, bool horizontal );
360
361   /**
362    * Helper for GetGlyphMetrics when using vectors
363    */
364   bool GetVectorMetrics( GlyphInfo* array, uint32_t size, bool horizontal );
365
366   /**
367    * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
368    */
369   void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth );
370
371   /**
372    * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
373    */
374   PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth );
375
376   /**
377    * @copydoc Dali::TextAbstraction::FontClient::CreateVectorBlob()
378    */
379   void CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight );
380
381   /**
382    * @copydoc Dali::TextAbstraction::FontClient::GetEllipsisGlyph()
383    */
384   const GlyphInfo& GetEllipsisGlyph( PointSize26Dot6 requestedPointSize );
385
386   /**
387    * @copydoc Dali::TextAbstraction::FontClient::IsColorGlyph()
388    */
389   bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
390
391   /**
392    * @copydoc Dali::TextAbstraction::FontClient::CreateEmbeddedItem()
393    */
394   GlyphIndex CreateEmbeddedItem( const TextAbstraction::FontClient::EmbeddedItemDescription& description, Pixel::Format& pixelFormat );
395
396   /**
397    * @copydoc Dali::TextAbstraction::Internal::FontClient::GetFreetypeFace()
398    */
399   FT_FaceRec_* GetFreetypeFace( FontId fontId );
400
401   /**
402    * @copydoc Dali::TextAbstraction::Internal::FontClient::GetFontType()
403    */
404   FontDescription::Type GetFontType( FontId fontId );
405
406   /**
407    * @copydoc Dali::TextAbstraction::FontClient::AddCustomFontDirectory()
408    */
409   bool AddCustomFontDirectory( const FontPath& path );
410
411 private:
412
413   /**
414    * @brief Caches the fonts present in the platform.
415    *
416    * Calls GetFcFontSet() to retrieve the fonts.
417    */
418   void InitSystemFonts();
419
420   /**
421    * @brief Gets the FontDescription which matches the given pattern.
422    *
423    * @note The reference counter of the @p characterSet has been increased. Call FcCharSetDestroy to decrease it.
424    *
425    * @param[in] pattern pattern to match against.
426    * @param[out] fontDescription the resultant fontDescription that matched.
427    * @param[out] characterSet The character set for that pattern.
428    * @return true if match found.
429    */
430   bool MatchFontDescriptionToPattern( _FcPattern* pattern, Dali::TextAbstraction::FontDescription& fontDescription, _FcCharSet** characterSet );
431
432   /**
433    * @brief Creates a font family pattern used to match fonts.
434    *
435    * @note Need to call FcPatternDestroy to free the resources.
436    *
437    * @param[in] fontDescription The font to cache.
438    *
439    * @return The pattern.
440    */
441   _FcPattern* CreateFontFamilyPattern( const FontDescription& fontDescription ) const;
442
443   /**
444    * @brief Retrieves the fonts present in the platform.
445    *
446    * @note Need to call FcFontSetDestroy to free the allocated resources.
447    *
448    * @return A font fonfig data structure with the platform's fonts.
449    */
450   _FcFontSet* GetFcFontSet() const;
451
452   /**
453    * @brief Retrieves a font config object's value from a pattern.
454    *
455    * @param[in] pattern The font config pattern.
456    * @param[in] n The object.
457    * @param[out] string The object's value.
458    *
459    * @return @e true if the operation is successful.
460    */
461   bool GetFcString( const _FcPattern* const pattern, const char* const n, std::string& string );
462
463   /**
464    * @brief Retrieves a font config object's value from a pattern.
465    *
466    * @param[in] pattern The font config pattern.
467    * @param[in] n The object.
468    * @param[out] intVal The object's value.
469    *
470    * @return @e true if the operation is successful.
471    */
472   bool GetFcInt( const _FcPattern* const pattern, const char* const n, int& intVal );
473
474   /**
475    * @brief Creates a font.
476    *
477    * @param[in] path The path to the font file name.
478    * @param[in] requestedPointSize The requested point size.
479    * @param[in] faceIndex A face index.
480    * @param[in] cacheDescription Whether to cache the font description.
481    *
482    * @return The font identifier.
483    */
484   FontId CreateFont( const FontPath& path,
485                      PointSize26Dot6 requestedPointSize,
486                      FaceIndex faceIndex,
487                      bool cacheDescription );
488
489   /**
490    * @brief Copy the color bitmap given in @p srcBuffer to @p data.
491    *
492    * @param[out] data The bitmap data.
493    * @param[in] srcWidth The width of the bitmap.
494    * @param[in] srcHeight The height of the bitmap.
495    * @param[in] srcBuffer The buffer of the bitmap.
496    */
497   void ConvertBitmap( TextAbstraction::FontClient::GlyphBufferData& data, unsigned int srcWidth, unsigned int srcHeight, const unsigned char* const srcBuffer );
498
499   /**
500    * @brief Copy the FreeType bitmap to the given buffer.
501    *
502    * @param[out] data The bitmap data.
503    * @param[in] srcBitmap The FreeType bitmap.
504    * @param[in] isShearRequired Whether the bitmap needs a shear transform (for software italics).
505    */
506   void ConvertBitmap( TextAbstraction::FontClient::GlyphBufferData& data, FT_Bitmap srcBitmap, bool isShearRequired );
507
508   /**
509    * @brief Finds in the cache if there is a triplet with the path to the font file name, the font point size and the face index.
510    * If there is one , if writes the font identifier in the param @p fontId.
511    *
512    * @param[in] path Path to the font file name.
513    * @param[in] requestedPointSize The font point size.
514    * @param[in] faceIndex The face index.
515    * @param[out] fontId The font identifier.
516    *
517    * @return @e true if there triplet is found.
518    */
519   bool FindFont( const FontPath& path, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex, FontId& fontId ) const;
520
521   /**
522    * @brief Finds in the cache a cluster 'font family, font width, font weight, font slant'
523    * If there is one, it writes the index to the vector with font descriptions in the param @p validatedFontId.
524    *
525    * @param[in] fontDescription The font to validate.
526    * @param[out] validatedFontId The index to the vector with font descriptions.
527    *
528    * @return @e true if the pair is found.
529    */
530   bool FindValidatedFont( const FontDescription& fontDescription,
531                           FontDescriptionId& validatedFontId );
532
533   /**
534    * @brief Finds a fallback font list from the cache for a given font-description
535    *
536    * @param[in] fontDescription The font to validate.
537    * @param[out] A valid pointer to a font list, or @e nullptr if not found.
538    * @param[out] characterSetList A valid pointer to a character set list, or @e nullptr if not found.
539    */
540   bool FindFallbackFontList( const FontDescription& fontDescription,
541                              FontList*& fontList,
542                              CharacterSetList*& characterSetList );
543
544   /**
545    * @brief Finds in the cache a pair 'validated font identifier and font point size'.
546    * If there is one it writes the font identifier in the param @p fontId.
547    *
548    * @param[in] validatedFontId Index to the vector with font descriptions.
549    * @param[in] requestedPointSize The font point size.
550    * @param[out] fontId The font identifier.
551    *
552    * @return @e true if the pair is found.
553    */
554   bool FindFont( FontDescriptionId validatedFontId,
555                  PointSize26Dot6 requestedPointSize,
556                  FontId& fontId );
557
558   /**
559    * @brief Finds in the cache a bitmap font with the @p bitmapFont family name.
560    *
561    * @param[in] bitmapFont The font's family name.
562    * @param[out] fontId The id of the font.
563    *
564    * @return Whether the font has been found.
565    */
566   bool FindBitmapFont( const FontFamily& bitmapFont, FontId& fontId ) const;
567
568   /**
569    * @brief Validate a font description.
570    *
571    * @param[in] fontDescription The font to validate.
572    * @param[out] validatedFontId Result of validation
573    */
574   void ValidateFont( const FontDescription& fontDescription,
575                      FontDescriptionId& validatedFontId );
576
577   /**
578    * @brief Helper for GetDefaultFonts etc.
579    *
580    * @note CharacterSetList is a vector of FcCharSet that are reference counted. It's needed to call FcCharSetDestroy to decrease the reference counter.
581    *
582    * @param[in] fontDescription A font description.
583    * @param[out] fontList A list of the fonts which are a close match for fontDescription.
584    * @param[out] characterSetList A list of character sets which are a close match for fontDescription.
585    */
586   void SetFontList( const FontDescription& fontDescription, FontList& fontList, CharacterSetList& characterSetList );
587
588   /**
589    * Caches a font path.
590    *
591    * @param[in] ftFace The FreeType face.
592    * @param[in] id The font identifier.
593    * @param[in] requestedPointSize The font point size.
594    * @param[in] path Path to the font file name.
595    */
596   void CacheFontPath( FT_Face ftFace, FontId id, PointSize26Dot6 requestedPointSize,  const FontPath& path );
597
598   /**
599    * @brief Creates a character set from a given font's @p description.
600    *
601    * @note Need to call FcCharSetDestroy to free the resources.
602    *
603    * @param[in] description The font's description.
604    *
605    * @return A character set.
606    */
607   _FcCharSet* CreateCharacterSetFromDescription( const FontDescription& description );
608
609   /**
610    * @brief Free the resources allocated in the fallback cache.
611    *
612    * @param[in] fallbackCache The fallback cache.
613    */
614   void ClearFallbackCache( std::vector<FallbackCacheItem>& fallbackCache );
615
616   /**
617    * @brief Free the resources allocated by the FcCharSet objects.
618    */
619   void ClearCharacterSetFromFontFaceCache();
620
621 private:
622
623   // Declared private and left undefined to avoid copies.
624   Plugin( const Plugin& );
625   // Declared private and left undefined to avoid copies.
626   Plugin& operator=( const Plugin& );
627
628 private:
629
630   FT_Library mFreeTypeLibrary; ///< A handle to a FreeType library instance.
631
632   unsigned int mDpiHorizontal; ///< Horizontal dpi.
633   unsigned int mDpiVertical;   ///< Vertical dpi.
634
635   FontDescription mDefaultFontDescription; ///< The cached default font from the system
636
637   FontList mSystemFonts;       ///< Cached system fonts.
638   FontList mDefaultFonts;      ///< Cached default fonts.
639   CharacterSetList mDefaultFontCharacterSets;
640
641   std::vector<FallbackCacheItem> mFallbackCache; ///< Cached fallback font lists.
642
643   Vector<FontIdCacheItem>                   mFontIdCache;
644   std::vector<FontFaceCacheItem>            mFontFaceCache;            ///< Caches the FreeType face and font metrics of the triplet 'path to the font file name, font point size and face index'.
645   std::vector<FontDescriptionCacheItem>     mValidatedFontCache;       ///< Caches indices to the vector of font descriptions for a given font.
646   FontList                                  mFontDescriptionCache;     ///< Caches font descriptions for the validated font.
647   CharacterSetList                          mCharacterSetCache;        ///< Caches character set lists for the validated font.
648   std::vector<FontDescriptionSizeCacheItem> mFontDescriptionSizeCache; ///< Caches font identifiers for the pairs of font point size and the index to the vector with font descriptions of the validated fonts.
649
650   VectorFontCache* mVectorFontCache; ///< Separate cache for vector data blobs etc.
651
652   Vector<EllipsisItem> mEllipsisCache;      ///< Caches ellipsis glyphs for a particular point size.
653   std::vector<PixelBufferCacheItem> mPixelBufferCache; ///< Caches the pixel buffer of a url.
654   Vector<EmbeddedItem> mEmbeddedItemCache; ///< Cache embedded items.
655   std::vector<BitmapFontCacheItem> mBitmapFontCache; ///< Stores bitmap fonts.
656
657   bool mDefaultFontDescriptionCached : 1; ///< Whether the default font is cached or not
658 };
659
660 } // namespace Internal
661
662 } // namespace TextAbstraction
663
664 } // namespace Dali
665
666 #endif // DALI_INTERNAL_TEXT_ABSTRACTION_FONT_CLIENT_PLUGIN_IMPL_H