From 9a8cf1c50b29173f2ceb0dca9ec0052fd3b2569b Mon Sep 17 00:00:00 2001 From: sodanotgreen Date: Wed, 23 Apr 2025 15:04:08 +0800 Subject: [PATCH] fontid Signed-off-by: sodanotgreen --- frameworks/native/runtime/js_data_struct_converter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frameworks/native/runtime/js_data_struct_converter.cpp b/frameworks/native/runtime/js_data_struct_converter.cpp index 7713a6a087..fff3bd6f06 100644 --- a/frameworks/native/runtime/js_data_struct_converter.cpp +++ b/frameworks/native/runtime/js_data_struct_converter.cpp @@ -136,6 +136,9 @@ napi_value CreateJsConfiguration(napi_env env, const AppExecFwk::Configuration& napi_set_named_property(env, object, "fontSizeScale", CreateJsValue(env, fontSizeScale == "" ? 1.0 : std::stod(fontSizeScale))); + napi_set_named_property(env, object, "fontId", CreateJsValue(env, + configuration.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_FONT_ID))); + std::string fontWeightScale = configuration.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_FONT_WEIGHT_SCALE); napi_set_named_property(env, object, "fontWeightScale", CreateJsValue(env, fontWeightScale == "" ? 1.0 : std::stod(fontWeightScale)));