@@ -1062,7 +1062,10 @@ void WindowsTextInputComponentView::updateProps(
10621062 oldTextInputProps.textAttributes .fontWeight != newTextInputProps.textAttributes .fontWeight ||
10631063 !facebook::react::floatEquality (
10641064 oldTextInputProps.textAttributes .letterSpacing , newTextInputProps.textAttributes .letterSpacing ) ||
1065- oldTextInputProps.textAttributes .fontFamily != newTextInputProps.textAttributes .fontFamily ) {
1065+ oldTextInputProps.textAttributes .fontFamily != newTextInputProps.textAttributes .fontFamily ||
1066+ !facebook::react::floatEquality (
1067+ oldTextInputProps.textAttributes .maxFontSizeMultiplier ,
1068+ newTextInputProps.textAttributes .maxFontSizeMultiplier )) {
10661069 m_propBitsMask |= TXTBIT_CHARFORMATCHANGE;
10671070 m_propBits |= TXTBIT_CHARFORMATCHANGE;
10681071 }
@@ -1422,9 +1425,15 @@ void WindowsTextInputComponentView::UpdateCharFormat() noexcept {
14221425
14231426 // set font size -- 15 to convert twips to pt
14241427 const auto &props = windowsTextInputProps ();
1425- float fontSize = m_fontSizeMultiplier *
1428+ float fontSize =
14261429 (std::isnan (props.textAttributes .fontSize ) ? facebook::react::TextAttributes::defaultTextAttributes ().fontSize
14271430 : props.textAttributes .fontSize );
1431+
1432+ // Apply maxFontSizeMultiplier if specified
1433+ auto maxFontSizeMultiplier = windowsTextInputProps ().textAttributes .maxFontSizeMultiplier ;
1434+ fontSize *=
1435+ (maxFontSizeMultiplier >= 1 .0f ) ? std::min (maxFontSizeMultiplier, m_fontSizeMultiplier) : m_fontSizeMultiplier;
1436+
14281437 // TODO get fontSize from props.textAttributes, or defaultTextAttributes, or fragment?
14291438 cfNew.dwMask |= CFM_SIZE;
14301439 cfNew.yHeight = static_cast <LONG>(fontSize * 15 );
0 commit comments