#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.
*/
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;
};
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;
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