From 16366cb1bd97ce8c331fc9c596109ddbd4c84ba7 Mon Sep 17 00:00:00 2001 From: jensdev Date: Wed, 8 Jul 2026 15:10:47 +0200 Subject: [PATCH] Fix custom font weight rendering heaviest face on iOS Fabric --- .../ios/react/renderer/textlayoutmanager/RCTFontUtils.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm index 9b04cadc22f5..b2b27626edc4 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm @@ -361,7 +361,7 @@ static UIFontDescriptorSystemDesign RCTGetFontDescriptorSystemDesign(NSString *f font = [UIFont fontWithName:fontProperties.family size:effectiveFontSize]; if (font != nullptr) { fontNames = [UIFont fontNamesForFamilyName:font.familyName]; - fontWeight = (fontWeight != 0.0) ?: RCTGetFontWeight(font); + fontWeight = (fontWeight != 0.0) ? fontWeight : RCTGetFontWeight(font); } else { // Failback to system font. font = RCTDefaultFontWithFontProperties(fontProperties);