diff --git a/BUILD.gn b/BUILD.gn index 0137260801911d97229917035e5e3523b103fe9b..a5d02c737ca5f38e69b5f5283e90fc60519553ba 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 8a2cbc466c523babecae452c3e905d9e35a8f85f..e39c8a173a5d0461e7b1ac0a83034c920c8f08e5 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 71824edc077a7c03cc745ed8c7480c6d61047aaa..79b4ff1dbdf0f362235420f5028b79f36920f1e6 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 = [ {