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( 17 "//foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/config.gni") 18 19config("rosen_text_ui_config") { 20 include_dirs = [ 21 "$rosen_2d_engine_root", 22 "$rosen_2d_engine_root_ui", 23 "$flutter_root/engine/flutter/third_party/txt/src", 24 ] 25} 26config("rosen_text_config") { 27 cflags_cc = [ 28 "-Wno-implicit-fallthrough", 29 "-fvisibility-inlines-hidden", 30 "-Os", 31 ] 32 include_dirs = [ 33 "$rosen_2d_engine_root", 34 "$flutter_root/engine/flutter/third_party/txt/src", 35 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include", 36 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src", 37 "//third_party/bounds_checking_function/include", 38 ] 39} 40ohos_source_set("rosen_text_ui") { 41 configs = [ 42 ":rosen_text_ui_config", 43 "$ace_flutter_engine_root:flutter_config", 44 "$ace_flutter_engine_root/icu:icu_config_$current_os", 45 ":rosen_text_config", 46 ] 47 sources = [ 48 "font_collection.cpp", 49 "typography.cpp", 50 "typography_create.cpp", 51 ] 52 sources += [ 53 "../properties/font_collection_txt.cpp", 54 "../properties/placeholder_run.cpp", 55 "../properties/rosen_converter_txt.cpp", 56 "../properties/text_style.cpp", 57 "../properties/typography_create_txt.cpp", 58 "../properties/typography_style.cpp", 59 "../properties/typography_txt.cpp", 60 ] 61 deps = [ 62 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", 63 "//third_party/bounds_checking_function:libsec_static", 64 "//third_party/flutter/build/libtxt:thirdparty_lib_txt_$current_os", 65 ] 66} 67