From a110294296ce7520c1627adc0f09a7470a19f803 Mon Sep 17 00:00:00 2001 From: "@ran-zhao-yu" Date: Wed, 9 Jul 2025 14:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=99=A8=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @ran-zhao-yu --- BUILD.gn | 25 ++++++++++++++++++++----- bundle.json | 6 +++++- systemres.gni | 4 ++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 01372608..a5d02c73 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -38,15 +38,14 @@ foreach(font, sys_fonts_list) { } } -group("ohos_fonts") { +ohos_shared_headers("ohos_fonts") { deps = [] foreach(dep, dep_list) { deps += [ ":${dep}" ] } - - if (system_resources_support_ext) { - deps += [ "${systemres_ext_path}:ohos_fonts_ext" ] - } + include_dirs = [] + subsystem_name = "global" + part_name = "system_resources" } ohos_copy("copy_preview_fonts") { @@ -61,3 +60,19 @@ ohos_copy("copy_preview_fonts") { subsystem_name = "global" part_name = "system_resources" } + +ohos_copy("copy_preview_fonts_ext") { + sources = [ + "${fontconfig_path}", + "${fontconfig_ohos_path}", + ] + foreach(font, sys_fonts_list) { + sources += [ font.font_path ] + } + outputs = + [ target_out_dir + "/previewer/resources/fonts/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/previewer/resources" + module_install_name = "" + subsystem_name = "global" + part_name = "system_resources" +} diff --git a/bundle.json b/bundle.json index 8a2cbc46..e39c8a17 100644 --- a/bundle.json +++ b/bundle.json @@ -56,7 +56,11 @@ "//base/global/system_resources/systemres:systemres_hap", "//base/global/system_resources:ohos_fonts" ], - "inner_kits": [], + "inner_kits": [ + { + "name":"//base/global/system_resources:ohos_fonts" + } + ], "test": [] } } diff --git a/systemres.gni b/systemres.gni index 71824edc..79b4ff1d 100644 --- a/systemres.gni +++ b/systemres.gni @@ -20,6 +20,10 @@ certificate_profile_path = "//vendor/tools/hap_sign_conf/global/system_resources/SystemResources.p7b" systemres_ext_path = "//vendor/${product_company}/base/global/system_resources" +fontconfig_path = + "//third_party/skia/src/ports/skia_ohos/config/fontconfig.json" +fontconfig_ohos_path = + "//third_party/skia/src/ports/skia_ohos/config/fontconfig_ohos.json" sys_fonts_list = [ { -- Gitee