1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/graphic/graphic_2d/graphic_config.gni") 16group("texgine_feature_test") { 17 public_deps = [ 18 ":texgine_sample_align", 19 ":texgine_sample_alignment", 20 ":texgine_sample_bug", 21 ":texgine_sample_calibrate", 22 ":texgine_sample_decoration", 23 ":texgine_sample_direction", 24 ":texgine_sample_dynamic_font", 25 ":texgine_sample_dynamic_otf_font", 26 ":texgine_sample_ellipsis", 27 ":texgine_sample_ellipsis_modal", 28 ":texgine_sample_emoji", 29 ":texgine_sample_feature", 30 ":texgine_sample_font_style", 31 ":texgine_sample_glyph_position", 32 ":texgine_sample_intrinsic_width", 33 ":texgine_sample_layout", 34 ":texgine_sample_mix", 35 ":texgine_sample_shadow", 36 ":texgine_sample_spacing", 37 ":texgine_sample_text_color", 38 ":texgine_sample_text_height", 39 ":texgine_sample_typography_height", 40 ":texgine_sample_weight_style", 41 ":texgine_sample_word_boundary", 42 ] 43} 44 45config("libskia_rs_framework_config") { 46 visibility = [ ":*" ] 47 48 cflags = [ 49 "-Wall", 50 "-Werror", 51 "-g3", 52 ] 53} 54 55config("libskia_rs_framework_public_config") { 56 include_dirs = [ 57 ".", 58 "$graphic_2d_root/rosen/modules/texgine/texgine_drawing", 59 ] 60} 61 62ohos_shared_library("libskia_rs_framework") { 63 if (defined(use_rosen_drawing) && use_rosen_drawing) { 64 defines = [ "USE_ROSEN_DRAWING" ] 65 } 66 sources = [ "skia_rs_framework.cpp" ] 67 68 configs = [ ":libskia_rs_framework_config" ] 69 70 public_configs = [ ":libskia_rs_framework_public_config" ] 71 72 public_deps = [ 73 "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", 74 "$graphic_2d_root/rosen/modules/texgine/texgine_drawing:libtexgine_drawing", 75 ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "eventhandler:libeventhandler", 80 "hilog:libhilog", 81 "hitrace:hitrace_meter", 82 "input:libmmi-client", 83 ] 84 85 part_name = "graphic_2d" 86 subsystem_name = "graphic" 87} 88 89ohos_source_set("texgine_sample") { 90 sources = [ 91 "feature_test/feature_test_framework.cpp", 92 "texgine_sample.cpp", 93 ] 94 95 public_deps = [ 96 ":libskia_rs_framework", 97 "$graphic_2d_root/rosen/modules/texgine:libtexgine", 98 ] 99 100 external_deps = [ 101 "c_utils:utils", 102 "hilog:libhilog", 103 "hitrace:hitrace_meter", 104 ] 105 106 if (defined(use_rosen_drawing) && use_rosen_drawing) { 107 defines = [ "USE_ROSEN_DRAWING" ] 108 } 109 110 part_name = "graphic_2d" 111 subsystem_name = "graphic" 112} 113 114ohos_executable("texgine_sample_align") { 115 install_enable = true 116 sources = [ "feature_test/align_test.cpp" ] 117 deps = [ ":texgine_sample" ] 118 part_name = "graphic_2d" 119 subsystem_name = "graphic" 120} 121 122ohos_executable("texgine_sample_alignment") { 123 install_enable = true 124 125 sources = [ "feature_test/alignment_test.cpp" ] 126 127 deps = [ ":texgine_sample" ] 128 129 part_name = "graphic_2d" 130 subsystem_name = "graphic" 131} 132 133ohos_executable("texgine_sample_calibrate") { 134 install_enable = true 135 136 sources = [ "feature_test/calibrate_position_test.cpp" ] 137 138 deps = [ ":texgine_sample" ] 139 140 part_name = "graphic_2d" 141 subsystem_name = "graphic" 142} 143 144ohos_executable("texgine_sample_decoration") { 145 install_enable = true 146 147 sources = [ "feature_test/decoration_test.cpp" ] 148 149 deps = [ ":texgine_sample" ] 150 151 part_name = "graphic_2d" 152 subsystem_name = "graphic" 153} 154 155ohos_executable("texgine_sample_direction") { 156 install_enable = true 157 158 sources = [ "feature_test/direction_test.cpp" ] 159 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 160 161 deps = [ ":texgine_sample" ] 162 163 part_name = "graphic_2d" 164 subsystem_name = "graphic" 165} 166 167ohos_executable("texgine_sample_mix") { 168 install_enable = true 169 170 sources = [ "feature_test/mix_test.cpp" ] 171 172 deps = [ ":texgine_sample" ] 173 174 part_name = "graphic_2d" 175 subsystem_name = "graphic" 176} 177 178ohos_executable("texgine_sample_shadow") { 179 install_enable = true 180 181 sources = [ "feature_test/shadow_test.cpp" ] 182 183 deps = [ ":texgine_sample" ] 184 185 part_name = "graphic_2d" 186 subsystem_name = "graphic" 187} 188 189ohos_executable("texgine_sample_bug") { 190 install_enable = true 191 192 sources = [ 193 "feature_test/bug1.cpp", 194 "feature_test/ellipsis_bug1.cpp", 195 ] 196 197 deps = [ ":texgine_sample" ] 198 199 part_name = "graphic_2d" 200 subsystem_name = "graphic" 201} 202 203ohos_executable("texgine_sample_dynamic_font") { 204 install_enable = true 205 206 sources = [ "feature_test/dynamic_font_test.cpp" ] 207 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 208 209 deps = [ ":texgine_sample" ] 210 211 part_name = "graphic_2d" 212 subsystem_name = "graphic" 213} 214 215ohos_executable("texgine_sample_emoji") { 216 install_enable = true 217 218 sources = [ "feature_test/emoji_test.cpp" ] 219 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 220 221 deps = [ ":texgine_sample" ] 222 223 part_name = "graphic_2d" 224 subsystem_name = "graphic" 225} 226 227ohos_executable("texgine_sample_font_style") { 228 install_enable = true 229 230 sources = [ "feature_test/font_style_test.cpp" ] 231 232 deps = [ ":texgine_sample" ] 233 234 part_name = "graphic_2d" 235 subsystem_name = "graphic" 236} 237 238ohos_executable("texgine_sample_feature") { 239 install_enable = true 240 241 sources = [ "feature_test/feature_test.cpp" ] 242 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 243 244 deps = [ ":texgine_sample" ] 245 part_name = "graphic_2d" 246 subsystem_name = "graphic" 247} 248 249ohos_executable("texgine_sample_glyph_position") { 250 install_enable = true 251 252 sources = [ "feature_test/glyph_position_test.cpp" ] 253 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 254 255 deps = [ ":texgine_sample" ] 256 part_name = "graphic_2d" 257 subsystem_name = "graphic" 258} 259 260ohos_executable("texgine_sample_intrinsic_width") { 261 install_enable = true 262 263 sources = [ "feature_test/intrinsic_width_test.cpp" ] 264 265 deps = [ ":texgine_sample" ] 266 part_name = "graphic_2d" 267 subsystem_name = "graphic" 268} 269 270ohos_executable("texgine_sample_spacing") { 271 install_enable = true 272 273 sources = [ "feature_test/spacing_test.cpp" ] 274 275 deps = [ ":texgine_sample" ] 276 277 part_name = "graphic_2d" 278 subsystem_name = "graphic" 279} 280 281ohos_executable("texgine_sample_strut") { 282 install_enable = true 283 284 sources = [ "feature_test/strut_test.cpp" ] 285 286 deps = [ ":texgine_sample" ] 287 part_name = "graphic_2d" 288 subsystem_name = "graphic" 289} 290 291ohos_executable("texgine_sample_text_color") { 292 install_enable = true 293 294 sources = [ "feature_test/text_color_test.cpp" ] 295 296 deps = [ ":texgine_sample" ] 297 part_name = "graphic_2d" 298 subsystem_name = "graphic" 299} 300 301ohos_executable("texgine_sample_weight_style") { 302 install_enable = true 303 304 sources = [ "feature_test/weight_style_test.cpp" ] 305 306 deps = [ ":texgine_sample" ] 307 308 part_name = "graphic_2d" 309 subsystem_name = "graphic" 310} 311 312ohos_executable("texgine_sample_word_boundary") { 313 install_enable = true 314 315 sources = [ "feature_test/word_boundary_test.cpp" ] 316 317 deps = [ ":texgine_sample" ] 318 319 part_name = "graphic_2d" 320 subsystem_name = "graphic" 321} 322 323ohos_executable("texgine_sample_ellipsis") { 324 install_enable = true 325 326 sources = [ "feature_test/ellipsis_test.cpp" ] 327 328 deps = [ ":texgine_sample" ] 329 330 part_name = "graphic_2d" 331 subsystem_name = "graphic" 332} 333 334ohos_executable("texgine_sample_layout") { 335 install_enable = true 336 337 sources = [ "feature_test/layout_test.cpp" ] 338 339 deps = [ ":texgine_sample" ] 340 341 part_name = "graphic_2d" 342 subsystem_name = "graphic" 343} 344 345ohos_executable("texgine_sample_dynamic_otf_font") { 346 install_enable = true 347 348 sources = [ "feature_test/dynamic_otf_font_test.cpp" ] 349 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 350 351 deps = [ ":texgine_sample" ] 352 353 part_name = "graphic_2d" 354 subsystem_name = "graphic" 355} 356 357ohos_executable("texgine_sample_text_height") { 358 install_enable = true 359 360 sources = [ "feature_test/text_height_test.cpp" ] 361 362 deps = [ ":texgine_sample" ] 363 364 part_name = "graphic_2d" 365 subsystem_name = "graphic" 366} 367 368ohos_executable("texgine_sample_typography_height") { 369 install_enable = true 370 371 sources = [ "feature_test/typography_height_test.cpp" ] 372 373 deps = [ ":texgine_sample" ] 374 375 part_name = "graphic_2d" 376 subsystem_name = "graphic" 377} 378 379ohos_executable("texgine_sample_ellipsis_modal") { 380 install_enable = true 381 382 sources = [ "feature_test/ellipsis_modal_test.cpp" ] 383 384 deps = [ ":texgine_sample" ] 385 386 part_name = "graphic_2d" 387 subsystem_name = "graphic" 388} 389