Change trace tag for text dorelayout
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / multi-language-support-impl.h
index de44e19..a9b8f4e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_IMPL_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -67,6 +67,14 @@ struct ValidateFontsPerScript
    */
   bool IsValidFont(FontId fontId) const;
 
+  /**
+   * @brief Cache the given @p fontId in the vector of valid fonts.
+   * @note If cache size is big enough, we might remove some caches.
+   *
+   * @param[in] fontId The font id.
+   */
+  void Cache(FontId fontId);
+
   Vector<FontId> mValidFonts;
 };
 
@@ -109,6 +117,13 @@ struct DefaultFonts
                   const TextAbstraction::FontDescription& description,
                   PointSize26Dot6                         size) const;
 
+  /**
+   * @brief Cache a default font for the given @p size.
+   * @note If cache size is big enough, we might remove some caches.
+   *
+   * @param[in] description The font's description.
+   * @param[in] fontId The font id.
+   */
   void Cache(const TextAbstraction::FontDescription& description, FontId fontId);
 
   std::vector<CacheItem> mFonts;
@@ -153,6 +168,7 @@ public:
                      const Vector<FontDescriptionRun>&       fontDescriptions,
                      const TextAbstraction::FontDescription& defaultFontDescription,
                      TextAbstraction::PointSize26Dot6        defaultFontPointSize,
+                     float                                   fontSizeScale,
                      CharacterIndex                          startIndex,
                      Length                                  numberOfCharacters,
                      Vector<FontRun>&                        fonts);
@@ -160,6 +176,28 @@ public:
 private:
   Vector<DefaultFonts*>           mDefaultFontPerScriptCache; ///< Caches default fonts for a script.
   Vector<ValidateFontsPerScript*> mValidFontsPerScriptCache;  ///< Caches valid fonts for a script.
+
+  //Methods
+
+  /**
+ * @brief Add the current script to scripts and create new script.
+ *
+ * @param[in] requestedScript The script of the new script run.
+ * @param[in] isRightToLeft The direction of the new script run.
+ * @param[in] addScriptCharactersToNewScript Whether to add the pending characters to the new script run or to the current script run.
+ * @param[inout] currentScriptRun The current character script run and it will be updated it to the new script run.
+ * @param[inout] numberOfAllScriptCharacters The pending characters.
+ * @param[inout] scripts The list of scripts.
+ * @param[inout] scriptIndex The current index of scripts.
+ *
+ */
+  void AddCurrentScriptAndCreatNewScript(const Script       requestedScript,
+                                         const bool         isRightToLeft,
+                                         const bool         addScriptCharactersToNewScript,
+                                         ScriptRun&         currentScriptRun,
+                                         Length&            numberOfAllScriptCharacters,
+                                         Vector<ScriptRun>& scripts,
+                                         ScriptRunIndex&    scriptIndex);
 };
 
 } // namespace Internal