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_FONT_H 17 #define UI_TEST_FONT_H 18 19 #include "components/ui_scroll_view.h" 20 #include "font/ui_font.h" 21 #include "ui_test.h" 22 23 namespace OHOS { 24 class UITestFont : public UITest { 25 public: UITestFont()26 UITestFont() {} ~UITestFont()27 ~UITestFont() {} 28 void SetUp() override; 29 void TearDown() override; 30 const UIView* GetTestView() override; 31 32 /** 33 * @brief Test single line Chinese display 34 */ 35 void UIKitFontTestDispaly001(); 36 37 /** 38 * @brief Test multiline Chinese display 39 */ 40 void UIKitFontTestDispaly002(); 41 42 /** 43 * @brief Test single line English display 44 */ 45 void UIKitFontTestDispaly003(); 46 47 /** 48 * @brief Test multiline English display 49 */ 50 void UIKitFontTestDispaly004(); 51 52 /** 53 * @brief Test single line Chinese and English display 54 */ 55 void UIKitFontTestDispaly005(); 56 57 /** 58 * @brief Test multiline Chinese and English display 59 */ 60 void UIKitFontTestDispaly006(); 61 62 /** 63 * @brief Test single line text color display 64 */ 65 void UIKitFontTestDispaly007(); 66 67 /** 68 * @brief Test multiline line text color display 69 */ 70 void UIKitFontTestDispaly008(); 71 72 /** 73 * @brief Test text rotate 74 */ 75 void UIKitFontTestDispaly009(); 76 77 /** 78 * @brief Test text rotate 79 */ 80 void UIKitFontTestDispaly010(); 81 82 /** 83 * @brief Test font baseline alignment 84 */ 85 void UIKitFontTestBaseline001(); 86 87 /** 88 * @brief Test font baseline alignment 89 */ 90 void UIKitFontTestBaseline002(); 91 92 /** 93 * @brief Test font lineheight alignment 94 */ 95 void UIKitFontTestLineHeight001(); 96 97 /** 98 * @brief Test font lineheight alignment 99 */ 100 void UIKitFontTestLineHeight002(); 101 102 #if ENABLE_MULTI_FONT 103 /** 104 * @brief Test multilingual display 105 */ 106 void UIKitFontMultiLanguage001(); 107 108 /** 109 * @brief Test multilingual display 110 */ 111 void UIKitFontMultiLanguage002(); 112 #endif // ENABLE_MULTI_FONT 113 private: 114 UIScrollView* container_ = nullptr; 115 void InnerTestTitle(const char* title); 116 }; 117 } // namespace OHOS 118 #endif // UI_TEST_FONT_H 119