Skip to content

Commit 16366cb

Browse files
committed
Fix custom font weight rendering heaviest face on iOS Fabric
1 parent 537d867 commit 16366cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager

packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static UIFontDescriptorSystemDesign RCTGetFontDescriptorSystemDesign(NSString *f
361361
font = [UIFont fontWithName:fontProperties.family size:effectiveFontSize];
362362
if (font != nullptr) {
363363
fontNames = [UIFont fontNamesForFamilyName:font.familyName];
364-
fontWeight = (fontWeight != 0.0) ?: RCTGetFontWeight(font);
364+
fontWeight = (fontWeight != 0.0) ? fontWeight : RCTGetFontWeight(font);
365365
} else {
366366
// Failback to system font.
367367
font = RCTDefaultFontWithFontProperties(fontProperties);

0 commit comments

Comments
 (0)