diff --git a/tester/harmony/AppScope/app.json5 b/tester/harmony/AppScope/app.json5 index d6694f26fb279a641cdfad81610c72ce9abea67b..b9bc655786c92180fc7007a9237b9eddcd7c430e 100644 --- a/tester/harmony/AppScope/app.json5 +++ b/tester/harmony/AppScope/app.json5 @@ -6,5 +6,6 @@ "versionName": "1.0.0", "icon": "$media:app_icon", "label": "$string:app_name", + "configuration": "$profile:configuration" } } diff --git a/tester/harmony/AppScope/resources/base/profile/configuration.json b/tester/harmony/AppScope/resources/base/profile/configuration.json new file mode 100644 index 0000000000000000000000000000000000000000..5bdd4f03dc5c6f5df2092fbcd1ca4fbbde0ab609 --- /dev/null +++ b/tester/harmony/AppScope/resources/base/profile/configuration.json @@ -0,0 +1,6 @@ +{ + "configuration": { + "fontSizeMaxScale": "3.2", + "fontSizeScale": "followSystem" + } +} \ No newline at end of file diff --git a/tester/harmony/react_native_openharmony/src/main/cpp/RNOH/TextMeasurer.cpp b/tester/harmony/react_native_openharmony/src/main/cpp/RNOH/TextMeasurer.cpp index a63356b4eadb463ffa8e128e4f72ecbd912c9ab7..b2cbed771699ab955c8b0c1cacb7418be1616edb 100644 --- a/tester/harmony/react_native_openharmony/src/main/cpp/RNOH/TextMeasurer.cpp +++ b/tester/harmony/react_native_openharmony/src/main/cpp/RNOH/TextMeasurer.cpp @@ -41,7 +41,7 @@ TextMeasurement TextMeasurer::measure( float fontMultiplier = 1.0; if (paragraphAttributes.allowFontScaling) { fontMultiplier = m_fontScale; - if (!isnan(paragraphAttributes.maxFontSizeMultiplier)) { + if (!isnan(paragraphAttributes.maxFontSizeMultiplier) && paragraphAttributes.maxFontSizeMultiplier >= 1) { fontMultiplier = std::min(m_fontScale, (float)paragraphAttributes.maxFontSizeMultiplier); } }