Respect prop Text.allowFontScaling when sizing text
Summary: changelog: [iOS][Fixed] Fix Text.allowFontScaling prop in the new architecture Reviewed By: javache Differential Revision: D40643536 fbshipit-source-id: 1fb77b226089ce5e9ffc642b1d9a3de266d202c3
This commit is contained in:
Родитель
5940d25cc1
Коммит
e9b89b5ff2
|
@ -71,7 +71,8 @@ inline static UIFont *RCTEffectiveFontFromTextAttributes(const TextAttributes &t
|
|||
fontProperties.weight = textAttributes.fontWeight.has_value()
|
||||
? RCTUIFontWeightFromInteger((NSInteger)textAttributes.fontWeight.value())
|
||||
: NAN;
|
||||
fontProperties.sizeMultiplier = textAttributes.fontSizeMultiplier;
|
||||
fontProperties.sizeMultiplier =
|
||||
textAttributes.allowFontScaling.value_or(true) ? textAttributes.fontSizeMultiplier : 1;
|
||||
|
||||
return RCTFontWithFontProperties(fontProperties);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче