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_emoji", 28 ":texgine_sample_feature", 29 ":texgine_sample_font_style", 30 ":texgine_sample_glyph_position", 31 ":texgine_sample_intrinsic_width", 32 ":texgine_sample_layout", 33 ":texgine_sample_mix", 34 ":texgine_sample_shadow", 35 ":texgine_sample_spacing", 36 ":texgine_sample_text_color", 37 ":texgine_sample_text_height", 38 ":texgine_sample_typography_height", 39 ":texgine_sample_weight_style", 40 ":texgine_sample_word_boundary", 41 ] 42} 43 44config("libskia_rs_framework_config") { 45 visibility = [ ":*" ] 46 47 cflags = [ 48 "-Wall", 49 "-Werror", 50 "-g3", 51 ] 52} 53 54config("libskia_rs_framework_public_config") { 55 include_dirs = [ 56 ".", 57 "$graphic_2d_root/rosen/modules/texgine/texgine_drawing", 58 ] 59} 60 61ohos_shared_library("libskia_rs_framework") { 62 sources = [ "skia_rs_framework.cpp" ] 63 64 configs = [ ":libskia_rs_framework_config" ] 65 66 public_configs = [ ":libskia_rs_framework_public_config" ] 67 68 public_deps = [ 69 "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", 70 "$graphic_2d_root/rosen/modules/texgine/texgine_drawing:libtexgine_drawing", 71 ] 72 73 external_deps = [ 74 "c_utils:utils", 75 "eventhandler:libeventhandler", 76 "hilog:libhilog", 77 "hitrace:hitrace_meter", 78 "input:libmmi-client", 79 ] 80 81 part_name = "graphic_2d" 82 subsystem_name = "graphic" 83} 84 85ohos_source_set("texgine_sample") { 86 sources = [ 87 "feature_test/feature_test_framework.cpp", 88 "texgine_sample.cpp", 89 ] 90 91 public_deps = [ 92 ":libskia_rs_framework", 93 "$graphic_2d_root/rosen/modules/texgine:libtexgine", 94 ] 95 96 external_deps = [ 97 "c_utils:utils", 98 "hilog:libhilog", 99 "hitrace:hitrace_meter", 100 ] 101 102 part_name = "graphic_2d" 103 subsystem_name = "graphic" 104} 105 106ohos_executable("texgine_sample_align") { 107 install_enable = true 108 sources = [ "feature_test/align_test.cpp" ] 109 deps = [ ":texgine_sample" ] 110 part_name = "graphic_2d" 111 subsystem_name = "graphic" 112} 113 114ohos_executable("texgine_sample_alignment") { 115 install_enable = true 116 117 sources = [ "feature_test/alignment_test.cpp" ] 118 119 deps = [ ":texgine_sample" ] 120 121 part_name = "graphic_2d" 122 subsystem_name = "graphic" 123} 124 125ohos_executable("texgine_sample_calibrate") { 126 install_enable = true 127 128 sources = [ "feature_test/calibrate_position_test.cpp" ] 129 130 deps = [ ":texgine_sample" ] 131 132 part_name = "graphic_2d" 133 subsystem_name = "graphic" 134} 135 136ohos_executable("texgine_sample_decoration") { 137 install_enable = true 138 139 sources = [ "feature_test/decoration_test.cpp" ] 140 141 deps = [ ":texgine_sample" ] 142 143 part_name = "graphic_2d" 144 subsystem_name = "graphic" 145} 146 147ohos_executable("texgine_sample_direction") { 148 install_enable = true 149 150 sources = [ "feature_test/direction_test.cpp" ] 151 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 152 153 deps = [ ":texgine_sample" ] 154 155 part_name = "graphic_2d" 156 subsystem_name = "graphic" 157} 158 159ohos_executable("texgine_sample_mix") { 160 install_enable = true 161 162 sources = [ "feature_test/mix_test.cpp" ] 163 164 deps = [ ":texgine_sample" ] 165 166 part_name = "graphic_2d" 167 subsystem_name = "graphic" 168} 169 170ohos_executable("texgine_sample_shadow") { 171 install_enable = true 172 173 sources = [ "feature_test/shadow_test.cpp" ] 174 175 deps = [ ":texgine_sample" ] 176 177 part_name = "graphic_2d" 178 subsystem_name = "graphic" 179} 180 181ohos_executable("texgine_sample_bug") { 182 install_enable = true 183 184 sources = [ 185 "feature_test/bug1.cpp", 186 "feature_test/ellipsis_bug1.cpp", 187 ] 188 189 deps = [ ":texgine_sample" ] 190 191 part_name = "graphic_2d" 192 subsystem_name = "graphic" 193} 194 195ohos_executable("texgine_sample_dynamic_font") { 196 install_enable = true 197 198 sources = [ "feature_test/dynamic_font_test.cpp" ] 199 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 200 201 deps = [ ":texgine_sample" ] 202 203 part_name = "graphic_2d" 204 subsystem_name = "graphic" 205} 206 207ohos_executable("texgine_sample_emoji") { 208 install_enable = true 209 210 sources = [ "feature_test/emoji_test.cpp" ] 211 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 212 213 deps = [ ":texgine_sample" ] 214 215 part_name = "graphic_2d" 216 subsystem_name = "graphic" 217} 218 219ohos_executable("texgine_sample_font_style") { 220 install_enable = true 221 222 sources = [ "feature_test/font_style_test.cpp" ] 223 224 deps = [ ":texgine_sample" ] 225 226 part_name = "graphic_2d" 227 subsystem_name = "graphic" 228} 229 230ohos_executable("texgine_sample_feature") { 231 install_enable = true 232 233 sources = [ "feature_test/feature_test.cpp" ] 234 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 235 236 deps = [ ":texgine_sample" ] 237 part_name = "graphic_2d" 238 subsystem_name = "graphic" 239} 240 241ohos_executable("texgine_sample_glyph_position") { 242 install_enable = true 243 244 sources = [ "feature_test/glyph_position_test.cpp" ] 245 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 246 247 deps = [ ":texgine_sample" ] 248 part_name = "graphic_2d" 249 subsystem_name = "graphic" 250} 251 252ohos_executable("texgine_sample_intrinsic_width") { 253 install_enable = true 254 255 sources = [ "feature_test/intrinsic_width_test.cpp" ] 256 257 deps = [ ":texgine_sample" ] 258 part_name = "graphic_2d" 259 subsystem_name = "graphic" 260} 261 262ohos_executable("texgine_sample_spacing") { 263 install_enable = true 264 265 sources = [ "feature_test/spacing_test.cpp" ] 266 267 deps = [ ":texgine_sample" ] 268 269 part_name = "graphic_2d" 270 subsystem_name = "graphic" 271} 272 273ohos_executable("texgine_sample_strut") { 274 install_enable = true 275 276 sources = [ "feature_test/strut_test.cpp" ] 277 278 deps = [ ":texgine_sample" ] 279 part_name = "graphic_2d" 280 subsystem_name = "graphic" 281} 282 283ohos_executable("texgine_sample_text_color") { 284 install_enable = true 285 286 sources = [ "feature_test/text_color_test.cpp" ] 287 288 deps = [ ":texgine_sample" ] 289 part_name = "graphic_2d" 290 subsystem_name = "graphic" 291} 292 293ohos_executable("texgine_sample_weight_style") { 294 install_enable = true 295 296 sources = [ "feature_test/weight_style_test.cpp" ] 297 298 deps = [ ":texgine_sample" ] 299 300 part_name = "graphic_2d" 301 subsystem_name = "graphic" 302} 303 304ohos_executable("texgine_sample_word_boundary") { 305 install_enable = true 306 307 sources = [ "feature_test/word_boundary_test.cpp" ] 308 309 deps = [ ":texgine_sample" ] 310 311 part_name = "graphic_2d" 312 subsystem_name = "graphic" 313} 314 315ohos_executable("texgine_sample_ellipsis") { 316 install_enable = true 317 318 sources = [ "feature_test/ellipsis_test.cpp" ] 319 320 deps = [ ":texgine_sample" ] 321 322 part_name = "graphic_2d" 323 subsystem_name = "graphic" 324} 325 326ohos_executable("texgine_sample_layout") { 327 install_enable = true 328 329 sources = [ "feature_test/layout_test.cpp" ] 330 331 deps = [ ":texgine_sample" ] 332 333 part_name = "graphic_2d" 334 subsystem_name = "graphic" 335} 336 337ohos_executable("texgine_sample_dynamic_otf_font") { 338 install_enable = true 339 340 sources = [ "feature_test/dynamic_otf_font_test.cpp" ] 341 defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] 342 343 deps = [ ":texgine_sample" ] 344 345 part_name = "graphic_2d" 346 subsystem_name = "graphic" 347} 348 349ohos_executable("texgine_sample_text_height") { 350 install_enable = true 351 352 sources = [ "feature_test/text_height_test.cpp" ] 353 354 deps = [ ":texgine_sample" ] 355 356 part_name = "graphic_2d" 357 subsystem_name = "graphic" 358} 359 360ohos_executable("texgine_sample_typography_height") { 361 install_enable = true 362 363 sources = [ "feature_test/typography_height_test.cpp" ] 364 365 deps = [ ":texgine_sample" ] 366 367 part_name = "graphic_2d" 368 subsystem_name = "graphic" 369} 370