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 UI_TEST_VECTOR_FONT_H 17 #define UI_TEST_VECTOR_FONT_H 18 19 #include "graphic_config.h" 20 #if 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 Font_FontEngine_Vector_Test_CH_Lang_001(); 35 void Font_FontEngine_Vector_Test_CH_Lang_002(); 36 void Font_FontEngine_Vector_Test_JA_Lang_001(); 37 void Font_FontEngine_Vector_Test_JA_Lang_002(); 38 void Font_FontEngine_Vector_Test_KR_Lang_001(); 39 void Font_FontEngine_Vector_Test_VI_Lang_001(); 40 #if ENABLE_MULTI_FONT 41 /** 42 * @brief Test JA language 43 */ 44 void Font_FontEngine_MultiLanguage_Test_JA_Lang_001(); 45 46 /** 47 * @brief Test UnRegister JA language 48 */ 49 void Font_FontEngine_MultiLanguage_Test_JA_Lang_002(); 50 51 /** 52 * @brief Test KR language 53 */ 54 void Font_FontEngine_MultiLanguage_Test_KR_Lang_001(); 55 56 /** 57 * @brief Test VI language 58 */ 59 void Font_FontEngine_MultiLanguage_Test_VI_Lang_001(); 60 61 /** 62 * @brief Test CS language 63 */ 64 void Font_FontEngine_MultiLanguage_Test_CS_Lang_001(); 65 66 /** 67 * @brief Test EL language 68 */ 69 void Font_FontEngine_MultiLanguage_Test_EL_Lang_001(); 70 71 /** 72 * @brief Test RO language 73 */ 74 void Font_FontEngine_MultiLanguage_Test_RO_Lang_001(); 75 #endif 76 private: 77 UIScrollView* container_ = nullptr; 78 void InnerTestTitle(const char* title); 79 int16_t xPos = 50; // 50: x initial position 80 int16_t yPos = 5; // 5 : y initial position 81 }; 82 } // namespace OHOS 83 #endif // ENABLE_VECTOR_FONT 84 #endif // UI_TEST_VECTOR_FONT_H 85