Moved font client plugin to new folder
[platform/core/uifw/dali-adaptor.git] / dali / internal / text / text-abstraction / plugin / 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) 2021 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/adaptor-framework/pixel-buffer.h>
23 #include <dali/devel-api/text-abstraction/bitmap-font.h>
24 #include <dali/devel-api/text-abstraction/font-metrics.h>
25 #include <dali/devel-api/text-abstraction/glyph-info.h>
26 #include <dali/internal/text/text-abstraction/font-client-impl.h>
27
28 #ifdef ENABLE_VECTOR_BASED_TEXT_RENDERING
29 #include <third-party/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_STROKER_H
39 #include FT_SYNTHESIS_H
40
41 // forward declarations of font config types.
42 struct _FcCharSet;
43 struct _FcFontSet;
44 struct _FcPattern;
45
46 namespace Dali
47 {
48 namespace TextAbstraction
49 {
50 namespace Internal
51 {
52 /**
53  * @brief Type used for indices addressing the vector with front descriptions of validated fonts.
54  */
55 typedef uint32_t FontDescriptionId;
56
57 /**
58  * @brief Type used for indices addressing the vector with pixel buffers.
59  */
60 typedef uint32_t PixelBufferId;
61
62 /**
63  * @brief Vector of character sets.
64  */
65 typedef Vector<_FcCharSet*> CharacterSetList;
66
67 /**
68  * @brief FontClient implementation.
69  */
70 struct FontClient::Plugin
71 {
72   struct FontIdCacheItem
73   {
74     FontDescription::Type type; ///< The type of font.
75     FontId                id;   ///< Index to the cache of fonts for the specified type.
76   };
77
78   /**
79    * @brief Caches an list of fallback fonts for a given font-description
80    */
81   struct FallbackCacheItem
82   {
83     FallbackCacheItem(FontDescription&& fontDescription, FontList* fallbackFonts, CharacterSetList* characterSets);
84
85     FontDescription   fontDescription; ///< The font description.
86     FontList*         fallbackFonts;   ///< The list of fallback fonts for the given font-description.
87     CharacterSetList* characterSets;   ///< The list of character sets for the given font-description.
88   };
89
90   /**
91    * @brief Caches an index to the vector of font descriptions for a given font.
92    */
93   struct FontDescriptionCacheItem
94   {
95     FontDescriptionCacheItem(const FontDescription& fontDescription,
96                              FontDescriptionId      index);
97     FontDescriptionCacheItem(FontDescription&& fontDescription,
98                              FontDescriptionId index);
99
100     FontDescription   fontDescription; ///< The font description.
101     FontDescriptionId index;           ///< Index to the vector of font descriptions.
102   };
103
104   /**
105    * @brief Caches the font id of the pair font point size and the index to the vector of font descriptions of validated fonts.
106    */
107   struct FontDescriptionSizeCacheItem
108   {
109     FontDescriptionSizeCacheItem(FontDescriptionId validatedFontId,
110                                  PointSize26Dot6   requestedPointSize,
111                                  FontId            fontId);
112
113     FontDescriptionId validatedFontId;    ///< Index to the vector with font descriptions.
114     PointSize26Dot6   requestedPointSize; ///< The font point size.
115     FontId            fontId;             ///< The font identifier.
116   };
117
118   /**
119    * @brief Caches the FreeType face and font metrics of the triplet 'path to the font file name, font point size and face index'.
120    */
121   struct FontFaceCacheItem
122   {
123     FontFaceCacheItem(FT_Face            ftFace,
124                       const FontPath&    path,
125                       PointSize26Dot6    requestedPointSize,
126                       FaceIndex          face,
127                       const FontMetrics& metrics);
128
129     FontFaceCacheItem(FT_Face            ftFace,
130                       const FontPath&    path,
131                       PointSize26Dot6    requestedPointSize,
132                       FaceIndex          face,
133                       const FontMetrics& metrics,
134                       int                fixedSizeIndex,
135                       float              fixedWidth,
136                       float              fixedHeight,
137                       bool               hasColorTables);
138
139     FT_Face         mFreeTypeFace;          ///< The FreeType face.
140     FontPath        mPath;                  ///< The path to the font file name.
141     PointSize26Dot6 mRequestedPointSize;    ///< The font point size.
142     FaceIndex       mFaceIndex;             ///< The face index.
143     FontMetrics     mMetrics;               ///< The font metrics.
144     _FcCharSet*     mCharacterSet;          ///< Pointer with the range of characters.
145     int             mFixedSizeIndex;        ///< Index to the fixed size table for the requested size.
146     float           mFixedWidthPixels;      ///< The height in pixels (fixed size bitmaps only)
147     float           mFixedHeightPixels;     ///< The height in pixels (fixed size bitmaps only)
148     unsigned int    mVectorFontId;          ///< The ID of the equivalent vector-based font
149     FontId          mFontId;                ///< Index to the vector with the cache of font's ids.
150     bool            mIsFixedSizeBitmap : 1; ///< Whether the font has fixed size bitmaps.
151     bool            mHasColorTables : 1;    ///< Whether the font has color tables.
152   };
153
154   struct EllipsisItem
155   {
156     PointSize26Dot6 requestedPointSize;
157     GlyphInfo       glyph;
158   };
159
160   /**
161    * @brief Caches pixel buffers.
162    */
163   struct PixelBufferCacheItem
164   {
165     Devel::PixelBuffer pixelBuffer; ///< The pixel buffer loaded from the url.
166     std::string        url;         ///< The url.
167   };
168
169   /**
170    * @brief Caches embedded items.
171    */
172   struct EmbeddedItem
173   {
174     PixelBufferId pixelBufferId; ///< Index to the vector of pixel buffers
175     unsigned int  width;         ///< The desired width.
176     unsigned int  height;        ///< The desired height.
177   };
178
179   /**
180    * @brief Stores a bitmap font and its pixel buffers per glyph.
181    */
182   struct BitmapFontCacheItem
183   {
184     BitmapFont                      font;         ///< The bitmap font.
185     std::vector<Devel::PixelBuffer> pixelBuffers; ///< The pixel buffers of the glyphs.
186     FontId                          id;           ///< Index to the vector with the cache of font's ids.
187   };
188
189   /**
190    * Constructor.
191    *
192    * Initializes the FreeType library.
193    * Initializes the dpi values.
194    *
195    * @param[in] horizontalDpi The horizontal dpi.
196    * @param[in] verticalDpi The vertical dpi.
197    */
198   Plugin(unsigned int horizontalDpi, unsigned int verticalDpi);
199
200   /**
201    * Default destructor.
202    *
203    * Frees any allocated resource.
204    */
205   ~Plugin();
206
207   /**
208    * @copydoc Dali::TextAbstraction::FontClient::ClearCache()
209    */
210   void ClearCache();
211
212   /**
213    * @copydoc Dali::TextAbstraction::FontClient::SetDpi()
214    */
215   void SetDpi(unsigned int horizontalDpi, unsigned int verticalDpi);
216
217   /**
218    * @copydoc Dali::TextAbstraction::FontClient::ResetSystemDefaults()
219    */
220   void ResetSystemDefaults();
221
222   /**
223    * @copydoc Dali::TextAbstraction::FontClient::SetDefaultFont()
224    */
225   void SetDefaultFont(const FontDescription& preferredFontDescription);
226
227   /**
228    * @copydoc Dali::TextAbstraction::FontClient::GetDefaultPlatformFontDescription()
229    */
230   void GetDefaultPlatformFontDescription(FontDescription& fontDescription);
231
232   /**
233    * @copydoc Dali::TextAbstraction::FontClient::GetDefaultFonts()
234    */
235   void GetDefaultFonts(FontList& defaultFonts);
236
237   /**
238    * @copydoc Dali::TextAbstraction::FontClient::GetSystemFonts()
239    */
240   void GetSystemFonts(FontList& systemFonts);
241
242   /**
243    * @copydoc Dali::TextAbstraction::FontClient::GetDescription()
244    */
245   void GetDescription(FontId id, FontDescription& fontDescription) const;
246
247   /**
248    * @copydoc Dali::TextAbstraction::FontClient::GetPointSize()
249    */
250   PointSize26Dot6 GetPointSize(FontId id);
251
252   /**
253    * @copydoc Dali::TextAbstraction::FontClient::IsCharacterSupportedByFont()
254    */
255   bool IsCharacterSupportedByFont(FontId fontId, Character character);
256
257   /**
258    * @brief Finds within the @p fontList a font which support the @p carcode.
259    *
260    * @param[in] fontList A list of font paths, family, width, weight and slant.
261    * @param[in] characterSetList A list that contains a character set for each description of the font list.
262    * @param[in] charcode The character for which a font is needed.
263    * @param[in] requestedPointSize The point size in 26.6 fractional points.
264    * @param[in] preferColor @e true if a color font is preferred.
265    *
266    * @return A valid font identifier, or zero if no font is found.
267    */
268   FontId FindFontForCharacter(const FontList&         fontList,
269                               const CharacterSetList& characterSetList,
270                               Character               charcode,
271                               PointSize26Dot6         requestedPointSize,
272                               bool                    preferColor);
273
274   /**
275    * @copydoc Dali::TextAbstraction::FontClient::FindDefaultFont()
276    */
277   FontId FindDefaultFont(Character       charcode,
278                          PointSize26Dot6 requestedPointSize,
279                          bool            preferColor);
280
281   /**
282    * @copydoc Dali::TextAbstraction::FontClient::FindFallbackFont()
283    */
284   FontId FindFallbackFont(Character              charcode,
285                           const FontDescription& preferredFontDescription,
286                           PointSize26Dot6        requestedPointSize,
287                           bool                   preferColor);
288
289   /**
290    * @see Dali::TextAbstraction::FontClient::GetFontId( const FontPath& path, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex )
291    *
292    * @param[in] cacheDescription Whether to cache the font description.
293    */
294   FontId GetFontId(const FontPath& path,
295                    PointSize26Dot6 requestedPointSize,
296                    FaceIndex       faceIndex,
297                    bool            cacheDescription);
298
299   /**
300    * @copydoc Dali::TextAbstraction::FontClient::GetFontId( const FontDescription& preferredFontDescription, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex )
301    */
302   FontId GetFontId(const FontDescription& fontDescription,
303                    PointSize26Dot6        requestedPointSize,
304                    FaceIndex              faceIndex);
305
306   /**
307    * @copydoc Dali::TextAbstraction::FontClient::GetFontId( const BitmapFont& bitmapFont )
308    */
309   FontId GetFontId(const BitmapFont& bitmapFont);
310
311   /**
312    * @copydoc Dali::TextAbstraction::FontClient::IsScalable( const FontPath& path )
313    */
314   bool IsScalable(const FontPath& path);
315
316   /**
317    * @copydoc Dali::TextAbstraction::FontClient::IsScalable( const FontDescription& fontDescription )
318    */
319   bool IsScalable(const FontDescription& fontDescription);
320
321   /**
322    * @copydoc Dali::TextAbstraction::FontClient::GetFixedSizes()
323    */
324   void GetFixedSizes(const FontPath& path, Dali::Vector<PointSize26Dot6>& sizes);
325
326   /**
327    * @copydoc Dali::TextAbstraction::FontClient::GetFixedSizes()
328    */
329   void GetFixedSizes(const FontDescription&         fontDescription,
330                      Dali::Vector<PointSize26Dot6>& sizes);
331
332   /**
333    * @copydoc Dali::TextAbstraction::FontClient::HasItalicStyle()
334    */
335   bool HasItalicStyle(FontId fontId) const;
336
337   /**
338    * @copydoc Dali::TextAbstraction::FontClient::GetFontMetrics()
339    */
340   void GetFontMetrics(FontId fontId, FontMetrics& metrics);
341
342   /**
343    * @copydoc Dali::TextAbstraction::FontClient::GetGlyphIndex()
344    */
345   GlyphIndex GetGlyphIndex(FontId fontId, Character charcode);
346
347   /**
348    * @copydoc Dali::TextAbstraction::FontClient::GetGlyphMetrics()
349    */
350   bool GetGlyphMetrics(GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal);
351
352   /**
353    * Helper for GetGlyphMetrics when using bitmaps
354    */
355   bool GetBitmapMetrics(GlyphInfo* array, uint32_t size, bool horizontal);
356
357   /**
358    * Helper for GetGlyphMetrics when using vectors
359    */
360   bool GetVectorMetrics(GlyphInfo* array, uint32_t size, bool horizontal);
361
362   /**
363    * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
364    */
365   void CreateBitmap(FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth);
366
367   /**
368    * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
369    */
370   PixelData CreateBitmap(FontId fontId, GlyphIndex glyphIndex, int outlineWidth);
371
372   /**
373    * @copydoc Dali::TextAbstraction::FontClient::CreateVectorBlob()
374    */
375   void CreateVectorBlob(FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight);
376
377   /**
378    * @copydoc Dali::TextAbstraction::FontClient::GetEllipsisGlyph()
379    */
380   const GlyphInfo& GetEllipsisGlyph(PointSize26Dot6 requestedPointSize);
381
382   /**
383    * @copydoc Dali::TextAbstraction::FontClient::IsColorGlyph()
384    */
385   bool IsColorGlyph(FontId fontId, GlyphIndex glyphIndex);
386
387   /**
388    * @copydoc Dali::TextAbstraction::FontClient::CreateEmbeddedItem()
389    */
390   GlyphIndex CreateEmbeddedItem(const TextAbstraction::FontClient::EmbeddedItemDescription& description, Pixel::Format& pixelFormat);
391
392   /**
393    * @copydoc Dali::TextAbstraction::FontClient::EnableAtlasLimitation(bool enabled)
394    */
395   void EnableAtlasLimitation(bool enabled);
396
397   /**
398    * @copydoc Dali::TextAbstraction::FontClient::IsAtlasLimitationEnabled()
399    */
400   bool IsAtlasLimitationEnabled() const;
401
402   /**
403    * @copydoc Dali::TextAbstraction::FontClient::GetMaximumTextAtlasSize()
404    */
405   Size GetMaximumTextAtlasSize() const;
406
407   /**
408    * @copydoc Dali::TextAbstraction::FontClient::GetDefaultTextAtlasSize()
409    */
410   Size GetDefaultTextAtlasSize() const;
411
412   /**
413    * @copydoc Dali::TextAbstraction::FontClient::GetCurrentMaximumBlockSizeFitInAtlas()
414    */
415   Size GetCurrentMaximumBlockSizeFitInAtlas() const;
416
417   /**
418    * @copydoc Dali::TextAbstraction::FontClient::SetCurrentMaximumBlockSizeFitInAtlas(const Size& currentMaximumBlockSizeFitInAtlas)
419    */
420   bool SetCurrentMaximumBlockSizeFitInAtlas(const Size& currentMaximumBlockSizeFitInAtlas);
421
422   /**
423    * @copydoc Dali::TextAbstraction::FontClient::GetNumberOfPointsPerOneUnitOfPointSize()
424    */
425   uint32_t GetNumberOfPointsPerOneUnitOfPointSize() const;
426
427   /**
428    * @copydoc Dali::TextAbstraction::Internal::FontClient::GetFreetypeFace()
429    */
430   FT_FaceRec_* GetFreetypeFace(FontId fontId);
431
432   /**
433    * @copydoc Dali::TextAbstraction::Internal::FontClient::GetFontType()
434    */
435   FontDescription::Type GetFontType(FontId fontId);
436
437   /**
438    * @copydoc Dali::TextAbstraction::FontClient::AddCustomFontDirectory()
439    */
440   bool AddCustomFontDirectory(const FontPath& path);
441
442 private:
443   /**
444    * @brief Caches the fonts present in the platform.
445    *
446    * Calls GetFcFontSet() to retrieve the fonts.
447    */
448   void InitSystemFonts();
449
450   /**
451    * @brief Gets the FontDescription which matches the given pattern.
452    *
453    * @note The reference counter of the @p characterSet has been increased. Call FcCharSetDestroy to decrease it.
454    *
455    * @param[in] pattern pattern to match against.
456    * @param[out] fontDescription the resultant fontDescription that matched.
457    * @param[out] characterSet The character set for that pattern.
458    * @return true if match found.
459    */
460   bool MatchFontDescriptionToPattern(_FcPattern* pattern, Dali::TextAbstraction::FontDescription& fontDescription, _FcCharSet** characterSet);
461
462   /**
463    * @brief Retrieves the fonts present in the platform.
464    *
465    * @note Need to call FcFontSetDestroy to free the allocated resources.
466    *
467    * @return A font fonfig data structure with the platform's fonts.
468    */
469   _FcFontSet* GetFcFontSet() const;
470
471   /**
472    * @brief Retrieves a font config object's value from a pattern.
473    *
474    * @param[in] pattern The font config pattern.
475    * @param[in] n The object.
476    * @param[out] string The object's value.
477    *
478    * @return @e true if the operation is successful.
479    */
480   bool GetFcString(const _FcPattern* const pattern, const char* const n, std::string& string);
481
482   /**
483    * @brief Retrieves a font config object's value from a pattern.
484    *
485    * @param[in] pattern The font config pattern.
486    * @param[in] n The object.
487    * @param[out] intVal The object's value.
488    *
489    * @return @e true if the operation is successful.
490    */
491   bool GetFcInt(const _FcPattern* const pattern, const char* const n, int& intVal);
492
493   /**
494    * @brief Creates a font.
495    *
496    * @param[in] path The path to the font file name.
497    * @param[in] requestedPointSize The requested point size.
498    * @param[in] faceIndex A face index.
499    * @param[in] cacheDescription Whether to cache the font description.
500    *
501    * @return The font identifier.
502    */
503   FontId CreateFont(const FontPath& path,
504                     PointSize26Dot6 requestedPointSize,
505                     FaceIndex       faceIndex,
506                     bool            cacheDescription);
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 Free the resources allocated in the fallback cache.
600    *
601    * @param[in] fallbackCache The fallback cache.
602    */
603   void ClearFallbackCache(std::vector<FallbackCacheItem>& fallbackCache);
604
605   /**
606    * @brief Free the resources allocated by the FcCharSet objects.
607    */
608   void ClearCharacterSetFromFontFaceCache();
609
610 private:
611   // Declared private and left undefined to avoid copies.
612   Plugin(const Plugin&);
613   // Declared private and left undefined to avoid copies.
614   Plugin& operator=(const Plugin&);
615
616 private:
617   FT_Library mFreeTypeLibrary; ///< A handle to a FreeType library instance.
618
619   unsigned int mDpiHorizontal; ///< Horizontal dpi.
620   unsigned int mDpiVertical;   ///< Vertical dpi.
621
622   FontDescription mDefaultFontDescription; ///< The cached default font from the system
623
624   FontList         mSystemFonts;  ///< Cached system fonts.
625   FontList         mDefaultFonts; ///< Cached default fonts.
626   CharacterSetList mDefaultFontCharacterSets;
627
628   std::vector<FallbackCacheItem> mFallbackCache; ///< Cached fallback font lists.
629
630   Vector<FontIdCacheItem>                   mFontIdCache;
631   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'.
632   std::vector<FontDescriptionCacheItem>     mValidatedFontCache;       ///< Caches indices to the vector of font descriptions for a given font.
633   FontList                                  mFontDescriptionCache;     ///< Caches font descriptions for the validated font.
634   CharacterSetList                          mCharacterSetCache;        ///< Caches character set lists for the validated font.
635   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.
636
637   VectorFontCache* mVectorFontCache; ///< Separate cache for vector data blobs etc.
638
639   Vector<EllipsisItem>              mEllipsisCache;     ///< Caches ellipsis glyphs for a particular point size.
640   std::vector<PixelBufferCacheItem> mPixelBufferCache;  ///< Caches the pixel buffer of a url.
641   Vector<EmbeddedItem>              mEmbeddedItemCache; ///< Cache embedded items.
642   std::vector<BitmapFontCacheItem>  mBitmapFontCache;   ///< Stores bitmap fonts.
643
644   bool mDefaultFontDescriptionCached : 1; ///< Whether the default font is cached or not
645
646   bool    mIsAtlasLimitationEnabled : 1;      ///< Whether the validation on maximum atlas block size, then reduce block size to fit into it is enabled or not.
647   Vector2 mCurrentMaximumBlockSizeFitInAtlas; ///< The current maximum size (width, height) of text-atlas-block.
648 };
649
650 } // namespace Internal
651
652 } // namespace TextAbstraction
653
654 } // namespace Dali
655
656 #endif // DALI_INTERNAL_TEXT_ABSTRACTION_FONT_CLIENT_PLUGIN_IMPL_H