Fix some text is max bold
This commit is contained in:
@@ -178,6 +178,19 @@ index 89b666dcf0258df0702c812600b685463128294c..2b1c3971f0c31a0d7a592b90170e4cc5
|
|||||||
val intersects = clippingRect.intersects(child.left, child.top, child.right, child.bottom)
|
val intersects = clippingRect.intersects(child.left, child.top, child.right, child.bottom)
|
||||||
var needUpdateClippingRecursive = false
|
var needUpdateClippingRecursive = false
|
||||||
|
|
||||||
|
diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm
|
||||||
|
index 9b04cad..b2b2762 100644
|
||||||
|
--- a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm
|
||||||
|
+++ b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm
|
||||||
|
@@ -361,7 +361,7 @@ UIFont *RCTFontWithFontProperties(RCTFontProperties fontProperties)
|
||||||
|
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);
|
||||||
diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
|
diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
|
||||||
index ac55304..d99c8f4 100644
|
index ac55304..d99c8f4 100644
|
||||||
--- a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
|
--- a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
|
||||||
|
|||||||
@@ -79,6 +79,16 @@ the prebuilt AAR from Maven Central instead, where this hunk (like any ReactAndr
|
|||||||
source change) has no effect - do not expect to see the fix in a local debug build unless
|
source change) has no effect - do not expect to see the fix in a local debug build unless
|
||||||
you prebuild with EXPO_PUBLIC_ENV=production or add the substitution block manually.
|
you prebuild with EXPO_PUBLIC_ENV=production or add the substitution block manually.
|
||||||
|
|
||||||
|
## RCTFontUtils.mm Patch - Custom font weights render as the heaviest face on New Arch
|
||||||
|
|
||||||
|
**TODO: Remove after bumping React Native to a release that contains facebook/react-native#57483**
|
||||||
|
(commit 918fb15bfe5f, on `main`; not in 0.86 and not yet released).
|
||||||
|
|
||||||
|
Backport of the upstream one-liner: use a real ternary so the numeric weight is returned instead of
|
||||||
|
the boolean. For a double, `(A != 0.0) ? A : B` is exactly equivalent to the original `A ?: B`.
|
||||||
|
|
||||||
|
PR: https://github.com/facebook/react-native/pull/57483
|
||||||
|
|
||||||
## RCTTextLayoutManager.mm Patch - Text overflows instead of wrapping on the last line
|
## RCTTextLayoutManager.mm Patch - Text overflows instead of wrapping on the last line
|
||||||
|
|
||||||
Issue: https://github.com/react/react-native/issues/53450#issuecomment-3298157830
|
Issue: https://github.com/react/react-native/issues/53450#issuecomment-3298157830
|
||||||
|
|||||||
Reference in New Issue
Block a user