1/*
2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef GRAPHIC_LITE_TEXT_SHAPING_H
17#define GRAPHIC_LITE_TEXT_SHAPING_H
18
19#include "graphic_config.h"
20#if ENABLE_SHAPING
21#include "font/ui_font_header.h"
22#include <cstdint>
23
24enum ShapingScript {
25    SHAPING_SCRIPT_ARABIC,
26    SHAPING_SCRIPT_THAI,
27    SHAPING_SCRIPT_DEVANAGARI,
28    SHAPING_SCRIPT_HEBREW,
29    SHAPING_SCRIPT_MYANMAR,
30    SHAPING_SCRIPT_BENGALI,
31    SHAPING_SCRIPT_INVALID
32};
33
34namespace OHOS {
35class UITextShaping {
36public:
37    /**
38     * @brief Construct a new UITextShaping object
39     */
40    UITextShaping();
41
42    /**
43     * @brief Destroy the UITextShaping object
44     */
45    ~UITextShaping();
46
47    /**
48     * @brief Get the Instance object
49     * @return UITextShaping* the static instance
50     */
51    static UITextShaping* GetInstance();
52
53    static bool IsSameTTFId(uint16_t fontId, uint32_t unicode);
54    void ClearTtfHeader();
55}; // class UITextShaping
56} // namespace OHOS
57#endif // ENABLE_SHAPING
58#endif // GRAPHIC_LITE_TEXT_SHAPING_H
59