[Tizen] Add support for FontClientFontPreLoad API
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / text-abstraction / font-client.h
old mode 100755 (executable)
new mode 100644 (file)
index 4dbb5f5..fd28e04
@@ -2,7 +2,7 @@
 #define DALI_PLATFORM_TEXT_ABSTRACTION_FONT_CLIENT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/images/buffer-image.h>
-#include <dali/public-api/images/pixel-data.h>
-#include <dali/public-api/object/base-handle.h>
 #include <dali/devel-api/text-abstraction/font-list.h>
 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
+#include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/dali-adaptor-common.h>
+#include <dali/public-api/images/pixel-data.h>
+#include <dali/public-api/object/base-handle.h>
 
 namespace Dali
 {
-
 namespace TextAbstraction
 {
-
 struct FontMetrics;
 struct GlyphInfo;
 struct BitmapFont;
@@ -64,8 +61,22 @@ class FontClient;
 class DALI_ADAPTOR_API FontClient : public BaseHandle
 {
 public:
-  static const PointSize26Dot6 DEFAULT_POINT_SIZE; ///< The default point size.
-  static const float DEFAULT_ITALIC_ANGLE;         ///< The default software italic angle in radians.
+  static const PointSize26Dot6 DEFAULT_POINT_SIZE;   ///< The default point size.
+  static const float           DEFAULT_ITALIC_ANGLE; ///< The default software italic angle in radians.
+
+  static const bool     DEFAULT_ATLAS_LIMITATION_ENABLED; ///< The default behavior of whether atlas limitation is enabled in dali.
+  static const uint32_t DEFAULT_TEXT_ATLAS_WIDTH;         ///< The default width of text-atlas-block.
+  static const uint32_t DEFAULT_TEXT_ATLAS_HEIGHT;        ///< The default height of text-atlas-block.
+  static const Size     DEFAULT_TEXT_ATLAS_SIZE;          ///< The default size(width, height) of text-atlas-block.
+
+  static const uint32_t MAX_TEXT_ATLAS_WIDTH;  ///< The maximum width of text-atlas-block.
+  static const uint32_t MAX_TEXT_ATLAS_HEIGHT; ///< The maximum height of text-atlas-block.
+  static const Size     MAX_TEXT_ATLAS_SIZE;   ///< The maximum height of text-atlas-block.
+
+  static const uint16_t PADDING_TEXT_ATLAS_BLOCK; ///< Padding per edge. How much the block size (width, height) less than the text-atlas-block size (width, height).
+  static const Size     MAX_SIZE_FIT_IN_ATLAS;    ///< The maximum block's size fit into text-atlas-block.
+
+  static const uint32_t NUMBER_OF_POINTS_PER_ONE_UNIT_OF_POINT_SIZE; ///< Factor multiply point-size in toolkit.
 
   /**
    * @brief Struct used to retrieve the glyph's bitmap.
@@ -84,10 +95,80 @@ public:
      */
     ~GlyphBufferData();
 
-    unsigned char* buffer; ///< The glyph's bitmap buffer data.
-    unsigned int   width;  ///< The width of the bitmap.
-    unsigned int   height; ///< The height of the bitmap.
-    Pixel::Format  format; ///< The pixel's format of the bitmap.
+    /**
+     * @brief Move constructor.
+     *
+     * @param[in] rhs moved data.
+     */
+    GlyphBufferData(GlyphBufferData&& rhs) noexcept;
+
+    /**
+     * @brief Move assign operator.
+     *
+     * @param[in] rhs moved data.
+     * @return A reference to this.
+     */
+    GlyphBufferData& operator=(GlyphBufferData&& rhs) noexcept;
+
+    // Compression method of buffer. Each buffer compressed line by line
+    enum class CompressionType
+    {
+      NO_COMPRESSION = 0, // No compression
+      BPP_4          = 1, // Compress as 4 bit. Color become value * 17 (0x00, 0x11, 0x22, ... 0xee, 0xff).
+                          // Only works for Pixel::L8 format
+      RLE_4 = 2,          // Compress as 4 bit, and Run-Length-Encode. For more high compress rate, we store difference between previous scanline.
+                          // Only works for Pixel::L8 format
+    };
+
+    /**
+     * @brief Helper static function to compress raw buffer from inBuffer to outBufferData.buffer.
+     * outBufferData will have it's own buffer.
+     *
+     * @pre outBufferData must not have it's own buffer.
+     * @param[in] inBuffer The input raw data.
+     * @param[in, out] outBufferData The output glyph buffer data.
+     * @return Size of compressed out buffer, Or 0 if compress failed.
+     */
+    static size_t Compress(const uint8_t* const inBuffer, GlyphBufferData& outBufferData);
+
+    /**
+     * @brief Helper static function to decompress raw buffer from inBuffer to outBufferPtr.
+     * If outBuffer is nullptr, Do nothing.
+     *
+     * @pre outBuffer memory should be allocated.
+     * @param[in] inBufferData The input glyph buffer data.
+     * @param[in, out] outBuffer The output pointer of raw buffer data.
+     */
+    static void Decompress(const GlyphBufferData& inBufferData, uint8_t* outBuffer);
+
+    /**
+     * @brief Special Helper static function to decompress raw buffer from inBuffer to outBuffer one scanline.
+     * After decompress one scanline successed, offset will be changed.
+     *
+     * @pre outBuffer memory should be allocated.
+     * @pre if inBufferData's compression type is RLE4, outBuffer memory should store the previous scanline data.
+     * @param[in] inBufferData The input glyph buffer data.
+     * @param[in, out] outBuffer The output pointer of raw buffer data.
+     * @param[in, out] offset The offset of input. It will be changed as next scanline's offset.
+     */
+    static void DecompressScanline(const GlyphBufferData& inBufferData, uint8_t* outBuffer, uint32_t& offset);
+
+  private:
+    // Delete copy operation.
+    GlyphBufferData(const GlyphBufferData& rhs) = delete;
+    GlyphBufferData& operator=(const GlyphBufferData& rhs) = delete;
+
+  public:
+    uint8_t*        buffer;            ///< The glyph's bitmap buffer data.
+    uint32_t        width;             ///< The width of the bitmap.
+    uint32_t        height;            ///< The height of the bitmap.
+    int             outlineOffsetX;    ///< The additional horizontal offset to be added for the glyph's position for outline.
+    int             outlineOffsetY;    ///< The additional vertical offset to be added for the glyph's position for outline.
+    Pixel::Format   format;            ///< The pixel's format of the bitmap.
+    CompressionType compressionType;   ///< The type of buffer compression.
+    bool            isColorEmoji : 1;  ///< Whether the glyph is an emoji.
+    bool            isColorBitmap : 1; ///< Whether the glyph is a color bitmap.
+    bool            isBufferOwned : 1; ///< Whether the glyph's bitmap buffer data owned by this class or not. Becareful when you use non-owned buffer data.
   };
 
   /**
@@ -102,7 +183,6 @@ public:
   };
 
 public:
-
   /**
    * @brief Retrieve a handle to the FontClient instance.
    *
@@ -127,7 +207,7 @@ public:
    *
    * @param[in] handle A reference to the copied handle.
    */
-  FontClient( const FontClient& handle );
+  FontClient(const FontClient& handle);
 
   /**
    * @brief This assignment operator is required for (smart) pointer semantics.
@@ -135,20 +215,41 @@ public:
    * @param [in] handle  A reference to the copied handle.
    * @return A reference to this.
    */
-  FontClient& operator=( const FontClient& handle );
+  FontClient& operator=(const FontClient& handle);
+
+  /**
+   * @brief This move constructor is required for (smart) pointer semantics.
+   *
+   * @param[in] handle A reference to the moved handle.
+   */
+  FontClient(FontClient&& handle);
+
+  /**
+   * @brief This move assignment operator is required for (smart) pointer semantics.
+   *
+   * @param [in] handle  A reference to the moved handle.
+   * @return A reference to this.
+   */
+  FontClient& operator=(FontClient&& handle);
 
   ////////////////////////////////////////
   // Font management and validation.
   ////////////////////////////////////////
 
   /**
+   * @brief Clear all caches in FontClient
+   *
+   */
+  void ClearCache();
+
+  /**
    * @brief Set the DPI of the target window.
    *
    * @note Multiple windows are not currently supported.
    * @param[in] horizontalDpi The horizontal resolution in DPI.
    * @param[in] verticalDpi The vertical resolution in DPI.
    */
-  void SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi );
+  void SetDpi(unsigned int horizontalDpi, unsigned int verticalDpi);
 
   /**
    * @brief Retrieves the DPI previously set to the target window.
@@ -157,7 +258,7 @@ public:
    * @param[out] horizontalDpi The horizontal resolution in DPI.
    * @param[out] verticalDpi The vertical resolution in DPI.
    */
-  void GetDpi( unsigned int& horizontalDpi, unsigned int& verticalDpi );
+  void GetDpi(unsigned int& horizontalDpi, unsigned int& verticalDpi);
 
   /**
    * @brief Called by Dali to retrieve the default font size for the platform.
@@ -180,38 +281,43 @@ public:
    *
    * @param[out] defaultFonts A list of default font paths, family, width, weight and slant.
    */
-  void GetDefaultFonts( FontList& defaultFonts );
+  void GetDefaultFonts(FontList& defaultFonts);
+
+  /**
+   * @brief Initializes and caches default font from the system.
+   */
+  void InitDefaultFontDescription();
 
   /**
    * @brief Retrieve the active default font from the system.
    *
    * @param[out] fontDescription font structure describing the default font.
    */
-  void GetDefaultPlatformFontDescription( FontDescription& fontDescription );
+  void GetDefaultPlatformFontDescription(FontDescription& fontDescription);
 
   /**
    * @brief Retrieve the list of fonts supported by the system.
    *
    * @param[out] systemFonts A list of font paths, family, width, weight and slant.
    */
-  void GetSystemFonts( FontList& systemFonts );
+  void GetSystemFonts(FontList& systemFonts);
 
   /**
-   * @brief Retrieves the font description of a given font @p id.
+   * @brief Retrieves the font description of a given font @p fontId.
    *
-   * @param[in] id The font identifier.
+   * @param[in] fontId The font identifier.
    * @param[out] fontDescription The path, family & style (width, weight and slant) describing the font.
    */
-  void GetDescription( FontId id, FontDescription& fontDescription );
+  void GetDescription(FontId fontId, FontDescription& fontDescription);
 
   /**
-   * @brief Retrieves the font point size of a given font @p id.
+   * @brief Retrieves the font point size of a given font @p fontId.
    *
-   * @param[in] id The font identifier.
+   * @param[in] fontId The font identifier.
    *
    * @return The point size in 26.6 fractional points.
    */
-  PointSize26Dot6 GetPointSize( FontId id );
+  PointSize26Dot6 GetPointSize(FontId fontId);
 
   /**
    * @brief Whether the given @p character is supported by the font.
@@ -221,7 +327,7 @@ public:
    *
    * @return @e true if the character is supported by the font.
    */
-  bool IsCharacterSupportedByFont( FontId fontId, Character character );
+  bool IsCharacterSupportedByFont(FontId fontId, Character character);
 
   /**
    * @brief Find the default font for displaying a UTF-32 character.
@@ -235,9 +341,9 @@ public:
    *
    * @return A valid font identifier, or zero if the font does not exist.
    */
-  FontId FindDefaultFont( Character charcode,
-                          PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
-                          bool preferColor = false );
+  FontId FindDefaultFont(Character       charcode,
+                         PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
+                         bool            preferColor        = false);
 
   /**
    * @brief Find a fallback-font for displaying a UTF-32 character.
@@ -253,10 +359,10 @@ public:
    *
    * @return A valid font identifier, or zero if the font does not exist.
    */
-  FontId FindFallbackFont( Character charcode,
-                           const FontDescription& preferredFontDescription,
-                           PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
-                           bool preferColor = false );
+  FontId FindFallbackFont(Character              charcode,
+                          const FontDescription& preferredFontDescription,
+                          PointSize26Dot6        requestedPointSize = DEFAULT_POINT_SIZE,
+                          bool                   preferColor        = false);
 
   /**
    * @brief Retrieve the unique identifier for a font.
@@ -267,9 +373,9 @@ public:
    *
    * @return A valid font identifier, or zero if the font does not exist.
    */
-  FontId GetFontId( const FontPath& path,
-                    PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
-                    FaceIndex faceIndex = 0 );
+  FontId GetFontId(const FontPath& path,
+                   PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
+                   FaceIndex       faceIndex          = 0);
 
   /**
    * @brief Retrieves a unique font identifier for a given description.
@@ -281,18 +387,19 @@ public:
    *
    * @return A valid font identifier, or zero if no font is found.
    */
-  FontId GetFontId( const FontDescription& preferredFontDescription,
-                    PointSize26Dot6 requestedPointSize = DEFAULT_POINT_SIZE,
-                    FaceIndex faceIndex = 0 );
+  FontId GetFontId(const FontDescription& preferredFontDescription,
+                   PointSize26Dot6        requestedPointSize = DEFAULT_POINT_SIZE,
+                   FaceIndex              faceIndex          = 0);
 
   /**
    * @brief Retrieves a unique font identifier for a given bitmap font.
+   * If the font is not present, it will cache the given font, and give it a new font id.
    *
    * @param[in] bitmapFont A bitmap font.
    *
-   * @return A valid font identifier, or zero if no bitmap font is created.
+   * @return A valid font identifier.
    */
-  FontId GetFontId( const BitmapFont& bitmapFont );
+  FontId GetFontId(const BitmapFont& bitmapFont);
 
   /**
    * @brief Check to see if a font is scalable.
@@ -300,7 +407,7 @@ public:
    * @param[in] path The path to a font file.
    * @return true if scalable.
    */
-  bool IsScalable( const FontPath& path );
+  bool IsScalable(const FontPath& path);
 
   /**
    * @brief Check to see if a font is scalable.
@@ -311,7 +418,7 @@ public:
    *
    * @return true if scalable
    */
-  bool IsScalable( const FontDescription& fontDescription );
+  bool IsScalable(const FontDescription& fontDescription);
 
   /**
    * @brief Get a list of sizes available for a fixed size font.
@@ -319,7 +426,7 @@ public:
    * @param[in] path The path to a font file.
    * @param[out] sizes A list of the available sizes, if no sizes available will return empty.
    */
-  void GetFixedSizes( const FontPath& path, Dali::Vector< PointSize26Dot6>& sizes );
+  void GetFixedSizes(const FontPath& path, Dali::Vector<PointSize26Dot6>& sizes);
 
   /**
    * @brief Get a list of sizes available for a fixed size font.
@@ -329,8 +436,8 @@ public:
    * @param[in] fontDescription A font description.
    * @param[out] sizes A list of the available sizes, if no sizes available will return empty.
    */
-  void GetFixedSizes( const FontDescription& fontDescription,
-                      Dali::Vector< PointSize26Dot6 >& sizes );
+  void GetFixedSizes(const FontDescription&         fontDescription,
+                     Dali::Vector<PointSize26Dot6>& sizes);
 
   /**
    * @brief Whether the font has Italic style.
@@ -339,7 +446,7 @@ public:
    *
    * @return true if the font has italic style.
    */
-  bool HasItalicStyle( FontId fontId ) const;
+  bool HasItalicStyle(FontId fontId) const;
 
   ////////////////////////////////////////
   // Font metrics, glyphs and bitmaps.
@@ -351,7 +458,7 @@ public:
    * @param[in] fontId The identifier of the font for the required glyph.
    * @param[out] metrics The font metrics.
    */
-  void GetFontMetrics( FontId fontId, FontMetrics& metrics );
+  void GetFontMetrics(FontId fontId, FontMetrics& metrics);
 
   /**
    * @brief Retrieve the glyph index for a UTF-32 character code.
@@ -361,7 +468,18 @@ public:
    *
    * @return The glyph index, or zero if the character code is undefined.
    */
-  GlyphIndex GetGlyphIndex( FontId fontId, Character charcode );
+  GlyphIndex GetGlyphIndex(FontId fontId, Character charcode);
+
+  /**
+   * @brief Return the glyph index of a given character code as modified by the variation selector.
+   *
+   * @param[in] fontId The identifier of the font for the required glyph.
+   * @param[in] charcode The UTF-32 character code.
+   * @param[in] variantSelector The UTF-32 character code point of the variation selector.
+   *
+   * @return The glyph index, or zero if the character code is undefined.
+   */
+  GlyphIndex GetGlyphIndex(FontId fontId, Character charcode, Character variantSelector);
 
   /**
    * @brief Retrieve the metrics for a series of glyphs.
@@ -375,7 +493,7 @@ public:
    *
    * @return @e true if all of the requested metrics were found.
    */
-  bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal = true );
+  bool GetGlyphMetrics(GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal = true);
 
   /**
    * @brief Create a bitmap representation of a glyph.
@@ -389,7 +507,7 @@ public:
    * @param[out] data             The bitmap data.
    * @param[in]  outlineWidth     The width of the glyph outline in pixels.
    */
-  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, GlyphBufferData& data, int outlineWidth );
+  void CreateBitmap(FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, GlyphBufferData& data, int outlineWidth);
 
   /**
    * @brief Create a bitmap representation of a glyph.
@@ -398,9 +516,9 @@ public:
    * @param[in] glyphIndex The index of a glyph within the specified font.
    * @param[in] outlineWidth The width of the glyph outline in pixels.
    *
-   * @return A valid BufferImage, or an empty handle if the glyph could not be rendered.
+   * @return A valid PixelData, or an empty handle if the glyph could not be rendered.
    */
-  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth );
+  PixelData CreateBitmap(FontId fontId, GlyphIndex glyphIndex, int outlineWidth);
 
   /**
    * @brief Create a vector representation of a glyph.
@@ -413,12 +531,12 @@ public:
    * @param[out] nominalWidth The width of the blob.
    * @param[out] nominalHeight The height of the blob.
    */
-  void CreateVectorBlob( FontId fontId,
-                         GlyphIndex glyphIndex,
-                         VectorBlob*& blob,
-                         unsigned int& blobLength,
-                         unsigned int& nominalWidth,
-                         unsigned int& nominalHeight );
+  void CreateVectorBlob(FontId        fontId,
+                        GlyphIndex    glyphIndex,
+                        VectorBlob*&  blob,
+                        unsigned int& blobLength,
+                        unsigned int& nominalWidth,
+                        unsigned int& nominalHeight);
 
   /**
    * @brief Retrieves the ellipsis glyph for a requested point size.
@@ -427,7 +545,7 @@ public:
    *
    * @return The ellipsis glyph.
    */
-  const GlyphInfo& GetEllipsisGlyph( PointSize26Dot6 requestedPointSize );
+  const GlyphInfo& GetEllipsisGlyph(PointSize26Dot6 requestedPointSize);
 
   /**
    * @brief Whether the given glyph @p glyphIndex is a color glyph.
@@ -437,7 +555,7 @@ public:
    *
    * @return @e true if the glyph is a color one.
    */
-  bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
+  bool IsColorGlyph(FontId fontId, GlyphIndex glyphIndex);
 
   /**
    * @brief  Add custom fonts directory
@@ -446,7 +564,7 @@ public:
    *
    * @return true if the fonts can be added.
    */
-  bool AddCustomFontDirectory( const FontPath& path );
+  bool AddCustomFontDirectory(const FontPath& path);
 
   /**
    * @brief Creates and stores an embedded item and it's metrics.
@@ -460,8 +578,64 @@ public:
    *
    * return The index within the vector of embedded items.
    */
-  GlyphIndex CreateEmbeddedItem( const EmbeddedItemDescription& description, Pixel::Format& pixelFormat);
+  GlyphIndex CreateEmbeddedItem(const EmbeddedItemDescription& description, Pixel::Format& pixelFormat);
 
+  /**
+   * @brief true to enable Atlas-Limitation.
+   *
+   * @note Used default configuration.
+   * @param[in] enabled The on/off value to enable/disable Atlas-Limitation.
+   */
+  void EnableAtlasLimitation(bool enabled);
+
+  /**
+   * @brief Check Atlas-Limitation is enabled or disabled.
+   *
+   * @note Used default configuration.
+   * return true if Atlas-Limitation is enabled, otherwise false.
+   */
+  bool IsAtlasLimitationEnabled() const;
+
+  /**
+   * @brief retrieve the maximum allowed width and height for text-atlas-block.
+   *
+   * @note Used default configuration.
+   * return the maximum width and height of text-atlas-block.
+   */
+  Size GetMaximumTextAtlasSize() const;
+
+  /**
+   * @brief retrieve the default width and height for text-atlas-block.
+   *
+   * @note Used default configuration.
+   * return the default width and height of text-atlas-block.
+   */
+  Size GetDefaultTextAtlasSize() const;
+
+  /**
+   * @brief retrieve the current maximum width and height for text-atlas-block.
+   *
+   * @note Used default configuration.
+   * return the current maximum width and height of text-atlas-block.
+   */
+  Size GetCurrentMaximumBlockSizeFitInAtlas() const;
+
+  /**
+   * @brief set the achieved size (width and height) for text-atlas-block.
+   * If @p currentMaximumBlockSizeFitInAtlas larger than the current maximum text atlas then store, otherwise ignore.
+   *
+   * @note Used default configuration.
+   * return true if the current maximum text atlas size is changed, otherwise false.
+   */
+  bool SetCurrentMaximumBlockSizeFitInAtlas(const Size& currentMaximumBlockSizeFitInAtlas);
+
+  /**
+   * @brief retrieve the number of points to scale-up one unit of point-size.
+   *
+   * @note Used default configuration.
+   * return the number of points per one unit of point-size
+   */
+  uint32_t GetNumberOfPointsPerOneUnitOfPointSize() const;
 
 public: // Not intended for application developers
   /**
@@ -469,9 +643,43 @@ public: // Not intended for application developers
    *
    * @param[in] fontClient  A pointer to the internal fontClient object.
    */
-  explicit DALI_INTERNAL FontClient( Internal::FontClient* fontClient );
+  explicit DALI_INTERNAL FontClient(Internal::FontClient* fontClient);
 };
 
+/**
+ * @brief This is used to improve application launch performance
+ *
+ * @return A pre-initialized FontClient
+ */
+DALI_ADAPTOR_API FontClient FontClientPreInitialize();
+
+/**
+ * @brief This is used to pre-cache FontConfig in order to improve the runtime performance of the application.
+ *
+ * @param[in] fallbackFamilyList A list of fallback font families to be pre-cached.
+ * @param[in] extraFamilyList A list of additional font families to be pre-cached.
+ * @param[in] localeFamily A locale font family to be pre-cached.
+ * @param[in] useThread True if the font client should create thread and perform pre-caching, false otherwise.
+ */
+DALI_ADAPTOR_API void FontClientPreCache(const FontFamilyList& fallbackFamilyList, const FontFamilyList& extraFamilyList, const FontFamily& localeFamily, bool useThread);
+
+/**
+ * @brief This is used to pre-load FreeType font face in order to improve the runtime performance of the application.
+ *
+ * @param[in] fontPathList A list of font paths to be pre-loaded.
+ * @param[in] memoryFontPathList A list of memory font paths to be pre-loaded.
+ * @param[in] useThread True if the font client should create thread and perform font pre-loading, false otherwise.
+ *
+ * @note
+ * The fonts in the fontPathList perform FT_New_Face during pre-loading,
+ * which can provide some performace benefits.
+ *
+ * The fonts in the memoryFontPathList read the font file and cache the buffer in memory during pre-load.
+ * This enables the use of FT_New_Memory_Face during runtime and provides a performance boost.
+ * It requires memory equivalent to the size of each font file.
+ */
+DALI_ADAPTOR_API void FontClientFontPreLoad(const FontPathList& fontPathList, const FontPathList& memoryFontPathList, bool useThread);
+
 } // namespace TextAbstraction
 
 } // namespace Dali