1# Copyright (c) 2022 Huawei Device Co., Ltd.. All rights reserved. 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/arkui/ace_engine/ace_config.gni") 16import("$graphic_2d_root/rosen/modules/2d_engine/rosen_text/config.gni") 17 18config("rosen_text_ui_config") { 19 include_dirs = [ 20 "$rosen_2d_engine_root", 21 "$rosen_2d_engine_root_ui", 22 ] 23 24 if (defined(use_new_skia) && use_new_skia) { 25 include_dirs += [ "$flutter_root/txt/src" ] 26 } else { 27 include_dirs += [ "$flutter_root/engine/flutter/third_party/txt/src" ] 28 } 29} 30config("rosen_text_config") { 31 cflags_cc = [ 32 "-Wno-implicit-fallthrough", 33 "-fvisibility-inlines-hidden", 34 "-Os", 35 ] 36 include_dirs = [ 37 "$rosen_2d_engine_root", 38 "$graphic_2d_root/rosen/modules/2d_graphics/include", 39 "$graphic_2d_root/rosen/modules/2d_graphics/src", 40 "//third_party/bounds_checking_function/include", 41 ] 42 if (defined(use_new_skia) && use_new_skia) { 43 include_dirs += [ "$flutter_root/txt/src" ] 44 } else { 45 include_dirs += [ "$flutter_root/engine/flutter/third_party/txt/src" ] 46 } 47} 48ohos_source_set("rosen_text_ui") { 49 configs = [ 50 ":rosen_text_ui_config", 51 "$ace_flutter_engine_root:flutter_config", 52 "$ace_flutter_engine_root/icu:icu_config_$current_os", 53 ":rosen_text_config", 54 ] 55 sources = [ 56 "font_collection.cpp", 57 "typography.cpp", 58 "typography_create.cpp", 59 ] 60 sources += [ 61 "../properties/font_collection_txt.cpp", 62 "../properties/placeholder_run.cpp", 63 "../properties/rosen_converter_txt.cpp", 64 "../properties/text_style.cpp", 65 "../properties/typography_create_txt.cpp", 66 "../properties/typography_style.cpp", 67 "../properties/typography_txt.cpp", 68 ] 69 deps = [ 70 "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", 71 "//third_party/bounds_checking_function:libsec_static", 72 "//third_party/flutter/build/libtxt:thirdparty_lib_txt_$current_os", 73 ] 74 part_name = "graphic_2d" 75 subsystem_name = "graphic" 76} 77