1 /*
2  * Copyright (c) 2020-2022 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 UI_TEST_VECTOR_FONT_H
17 #define UI_TEST_VECTOR_FONT_H
18 
19 #include "graphic_config.h"
20 #if defined(ENABLE_VECTOR_FONT) && ENABLE_VECTOR_FONT
21 #include "ui_test.h"
22 #include "components/ui_scroll_view.h"
23 #include "font/ui_font.h"
24 #include <string>
25 
26 namespace OHOS {
27 class UITestVectorFont : public UITest {
28 public:
UITestVectorFont()29     UITestVectorFont() {}
~UITestVectorFont()30     ~UITestVectorFont() {}
31     void SetUp() override;
32     void TearDown() override;
33     const UIView* GetTestView() override;
34     void FontFontEngineVectorTestCHLang001();
35     void FontFontEngineVectorTestCHLang002();
36     void FontFontEngineVectorTestJALang001();
37     void FontFontEngineVectorTestJALang002();
38     void FontFontEngineVectorTestKRLang001();
39     void FontFontEngineVectorTestVILang001();
40 #if ENABLE_MULTI_FONT
41     /**
42      * @brief Test JA language
43      */
44     void FontFontEngineMultiLanguageTestJALang001();
45 
46     /**
47      * @brief Test UnRegister JA language
48      */
49     void FontFontEngineMultiLanguageTestJALang002();
50 
51     /**
52      * @brief Test KR language
53      */
54     void FontFontEngineMultiLanguageTestKRLang001();
55 
56     /**
57      * @brief Test VI language
58      */
59     void FontFontEngineMultiLanguageTestVILang001();
60 
61     /**
62      * @brief Test CS language
63      */
64     void FontFontEngineMultiLanguageTestCSLang001();
65 
66     /**
67      * @brief Test EL language
68      */
69     void FontFontEngineMultiLanguageTestELLang001();
70 
71     /**
72      * @brief Test RO language
73      */
74     void FontFontEngineMultiLanguageTestROLang001();
75 #endif
76 
77 #if defined(ENABLE_TEXT_STYLE) && ENABLE_TEXT_STYLE
78     void TestDrawTextITALYBOLD();
79 #endif
80 private:
81     UIScrollView* container_ = nullptr;
82     void InnerTestTitle(const char* title);
83     int16_t xPos = 50; // 50: x initial position
84     int16_t yPos = 5; // 5 : y initial position
85 };
86 } // namespace OHOS
87 #endif // ENABLE_VECTOR_FONT
88 #endif // UI_TEST_VECTOR_FONT_H
89