# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") group("texgine_feature_test") { public_deps = [ ":texgine_sample_align", ":texgine_sample_alignment", ":texgine_sample_bug", ":texgine_sample_calibrate", ":texgine_sample_decoration", ":texgine_sample_direction", ":texgine_sample_dynamic_font", ":texgine_sample_dynamic_otf_font", ":texgine_sample_ellipsis", ":texgine_sample_ellipsis_modal", ":texgine_sample_emoji", ":texgine_sample_feature", ":texgine_sample_font_style", ":texgine_sample_glyph_position", ":texgine_sample_intrinsic_width", ":texgine_sample_layout", ":texgine_sample_mix", ":texgine_sample_shadow", ":texgine_sample_spacing", ":texgine_sample_text_color", ":texgine_sample_text_height", ":texgine_sample_typography_height", ":texgine_sample_weight_style", ":texgine_sample_word_boundary", ] } config("libskia_rs_framework_config") { visibility = [ ":*" ] cflags = [ "-Wall", "-Werror", "-g3", ] } config("libskia_rs_framework_public_config") { include_dirs = [ ".", "$graphic_2d_root/rosen/modules/texgine/texgine_drawing", ] } ohos_shared_library("libskia_rs_framework") { if (defined(use_rosen_drawing) && use_rosen_drawing) { defines = [ "USE_ROSEN_DRAWING" ] } sources = [ "skia_rs_framework.cpp" ] configs = [ ":libskia_rs_framework_config" ] public_configs = [ ":libskia_rs_framework_public_config" ] public_deps = [ "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", "$graphic_2d_root/rosen/modules/texgine/texgine_drawing:libtexgine_drawing", ] external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "input:libmmi-client", ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_source_set("texgine_sample") { sources = [ "feature_test/feature_test_framework.cpp", "texgine_sample.cpp", ] public_deps = [ ":libskia_rs_framework", "$graphic_2d_root/rosen/modules/texgine:libtexgine", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", ] if (defined(use_rosen_drawing) && use_rosen_drawing) { defines = [ "USE_ROSEN_DRAWING" ] } part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_align") { install_enable = true sources = [ "feature_test/align_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_alignment") { install_enable = true sources = [ "feature_test/alignment_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_calibrate") { install_enable = true sources = [ "feature_test/calibrate_position_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_decoration") { install_enable = true sources = [ "feature_test/decoration_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_direction") { install_enable = true sources = [ "feature_test/direction_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_mix") { install_enable = true sources = [ "feature_test/mix_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_shadow") { install_enable = true sources = [ "feature_test/shadow_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_bug") { install_enable = true sources = [ "feature_test/bug1.cpp", "feature_test/ellipsis_bug1.cpp", ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_dynamic_font") { install_enable = true sources = [ "feature_test/dynamic_font_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_emoji") { install_enable = true sources = [ "feature_test/emoji_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_font_style") { install_enable = true sources = [ "feature_test/font_style_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_feature") { install_enable = true sources = [ "feature_test/feature_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_glyph_position") { install_enable = true sources = [ "feature_test/glyph_position_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_intrinsic_width") { install_enable = true sources = [ "feature_test/intrinsic_width_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_spacing") { install_enable = true sources = [ "feature_test/spacing_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_strut") { install_enable = true sources = [ "feature_test/strut_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_text_color") { install_enable = true sources = [ "feature_test/text_color_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_weight_style") { install_enable = true sources = [ "feature_test/weight_style_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_word_boundary") { install_enable = true sources = [ "feature_test/word_boundary_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_ellipsis") { install_enable = true sources = [ "feature_test/ellipsis_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_layout") { install_enable = true sources = [ "feature_test/layout_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_dynamic_otf_font") { install_enable = true sources = [ "feature_test/dynamic_otf_font_test.cpp" ] defines = [ "RESOURCE_PATH_PREFIX=\"/system/etc/test_resources/\"" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_text_height") { install_enable = true sources = [ "feature_test/text_height_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_typography_height") { install_enable = true sources = [ "feature_test/typography_height_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" } ohos_executable("texgine_sample_ellipsis_modal") { install_enable = true sources = [ "feature_test/ellipsis_modal_test.cpp" ] deps = [ ":texgine_sample" ] part_name = "graphic_2d" subsystem_name = "graphic" }