From 8bd745a1ceac33b968518741acd1b7ce9207031d Mon Sep 17 00:00:00 2001 From: Qutrek <235843705+qutrek@users.noreply.github.com> Date: Wed, 21 Oct 2026 02:36:15 +0300 Subject: [PATCH 1/2] [iOS] Resolve natural text alignment from the layout direction for LTR as well as RTL --- .../react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm index 1a33fa977d82..a3ad0ba00df3 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm @@ -219,7 +219,7 @@ inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const Tex NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; BOOL isParagraphStyleUsed = NO; const bool isRTL = textAttributes.layoutDirection == LayoutDirection::RightToLeft; - if (textAttributes.alignment.has_value() || isRTL) { + if (textAttributes.alignment.has_value() || textAttributes.layoutDirection.has_value()) { TextAlignment textAlignment = RCTResolveTextAlignment(textAttributes.alignment.value_or(TextAlignment::Natural), isRTL); From bdd8fbeeb67244c889f94cc7d4d27c917231db74 Mon Sep 17 00:00:00 2001 From: Qutrek <235843705+qutrek@users.noreply.github.com> Date: Wed, 21 Oct 2026 18:30:53 +0300 Subject: [PATCH 2/2] Move isRTL inside the if --- .../react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm index a3ad0ba00df3..791d8d129473 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm @@ -218,8 +218,8 @@ inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const Tex // Paragraph Style NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; BOOL isParagraphStyleUsed = NO; - const bool isRTL = textAttributes.layoutDirection == LayoutDirection::RightToLeft; if (textAttributes.alignment.has_value() || textAttributes.layoutDirection.has_value()) { + const bool isRTL = textAttributes.layoutDirection == LayoutDirection::RightToLeft; TextAlignment textAlignment = RCTResolveTextAlignment(textAttributes.alignment.value_or(TextAlignment::Natural), isRTL);