1 #ifndef __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_HELPER_FUNCTIONS_H__
2 #define __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_HELPER_FUNCTIONS_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-vector.h>
25 #include <dali-toolkit/internal/text/font-description-run.h>
26 #include <dali-toolkit/internal/text/script-run.h>
38 * @brief Merges the font descriptions to retrieve the font Id for each character.
40 * @param[in] fontDescriptions The font descriptions.
41 * @param[out] fontIds The font id for each character.
42 * @param[out] isDefaultFont Whether the font is a default one.
43 * @param[in] defaultFontDescription The default font description.
44 * @param[in] defaultPointSize The default font size.
45 * @param[in] startIndex The character from where the fonts are merged.
46 * @param[in] numberOfCharacters The number of characters to set the font.
48 void MergeFontDescriptions( const Vector<FontDescriptionRun>& fontDescriptions,
49 Vector<FontId>& fontIds,
50 Vector<bool>& isDefaultFont,
51 const TextAbstraction::FontDescription& defaultFontDescription,
52 TextAbstraction::PointSize26Dot6 defaultPointSize,
53 CharacterIndex startIndex,
54 Length numberOfCharacters );
57 * @brief Retrieves the script Id from the script run for a given character's @p index.
59 * If the character's index exceeds the current script run it increases the iterator to get the next one.
61 * @param[in] index The character's index.
62 * @param[in,out] scriptRunIt Iterator to the current script run.
63 * @param[in] scriptRunEndIt Iterator to one after the last script run.
67 Script GetScript( Length index,
68 Vector<ScriptRun>::ConstIterator& scriptRunIt,
69 const Vector<ScriptRun>::ConstIterator& scriptRunEndIt );
73 } // namespace Toolkit
77 #endif // __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_HELPER_FUNCTIONS_H__