1 #ifndef __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_H__
2 #define __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_H__
5 * Copyright (c) 2015 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-toolkit/public-api/text/text-definitions.h>
25 #include <dali/public-api/object/base-handle.h>
36 namespace Internal DALI_INTERNAL
39 class MultilanguageSupport;
46 * @brief Sets the character's scripts to the model and validates the fonts set by the user or assigns default ones.
48 class MultilanguageSupport : public BaseHandle
53 * @brief Create an uninitialized MultilanguageSupport handle.
55 MultilanguageSupport();
60 * This is non-virtual since derived Handle types must not contain data or virtual methods.
62 ~MultilanguageSupport();
65 * @brief This constructor is used by MultilanguageSupport::Get().
67 * @param[in] implementation A pointer to the internal multilanguage support object.
69 explicit DALI_INTERNAL MultilanguageSupport( Internal::MultilanguageSupport* implementation );
72 * @brief Retrieve a handle to the MultilanguageSupport instance.
74 * @return A handle to the MultilanguageSupport.
76 static MultilanguageSupport Get();
79 * @brief Sets the scripts of the whole text.
81 * Any script info previously set is removed.
83 * @pre The @p model needs to have a text set.
85 * @param[in,out] model The text's logical model.
87 void SetScripts( LogicalModel& model );
90 * @brief Validates the character's font of the whole text.
92 * It may update fonts set by the mark-up processor.
93 * It sets default fonts based on the script to those characters without a font set.
95 * @pre The @p model needs to have a text set.
96 * @pre The @p model needs to have the scripts set.
98 * @param[in,out] model The text's logical model.
100 void ValidateFonts( LogicalModel& model );
105 } // namespace Toolkit
109 #endif // __DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_H__