Repository navigation
Open
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Platform: AndroidAndroid applications.Android applications.
Description
Description
On some Android devices (for example Redmi 10C or Pixel 6 Pro) text is a measuring bug when setting both lineHeight and letterSpacing.
Some specific combinations of fontScale, lineHeight, maxFontSizeMultiplier, letterSpacing, fontFamily and also on the text causes extra line wrap.
In our case, it was possible to "fix" it by removing maxFontSizeMultiplier or letterSpacing or lineHeight.
But as a workaround we set allowFontScaling={false} and do the font scaling manually (setting fontSize and lineHeight by the fontScale).
Already reported #35039 but closed
Steps to reproduce
- Open Snack link https://snack.expo.dev/@matejkriztrezor/line-break-bug-demo
- Choose Android
- Switch to Pixel 6 Pro
- Launch Snack
React Native Version
0.75.2
Affected Platforms
Runtime - Android
Output of npx react-native info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1 Pro
Memory: 144.11 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.12.2
path: ~/.nvm/versions/node/v20.12.2/bin/node
Yarn:
version: 4.2.2
path: /opt/homebrew/bin/yarn
npm:
version: 10.5.0
path: ~/.nvm/versions/node/v20.12.2/bin/npm
Watchman:
version: 2024.04.08.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/matejkriz/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK:
API Levels:
- "29"
- "30"
- "31"
- "33"
- "34"
Build Tools:
- 29.0.2
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
System Images:
- android-28 | Google ARM64-V8a Play ARM 64 v8a
- android-29 | Google Play ARM 64 v8a
- android-31 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2412.12266719
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 3.2.1
path: /Users/matejkriz/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
there is no crash, only UI bug
Reproducer
https://snack.expo.dev/@matejkriztrezor/line-break-bug-demo?platform=android
import React from 'react';
import {Text, View} from 'react-native';
export default () => (
<View style={{flexDirection: 'row'}}>
<Text
style={{
letterSpacing: 1.6,
lineHeight: 21,
}}>
0123456789
</Text>
</View>
);Screenshots and Videos

Reacted by vytick, Tyler Deitz, Daniel Friyia, Ahmed Ali, Siggi Jonsson, Lise Grudler, Jiří Petera, Ricardo Matsui, Jordan Richards and [object Object]
Metadata
Metadata
Assignees
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Platform: AndroidAndroid applications.Android applications.
Activity
fix(suite-native): fix extra line breaks on some Android phones
young-st511 commentedon Sep 27, 2024
I experienced this issue too. Thank you for fixing it!
matejkriz commentedon Feb 17, 2025
I'm afraid there is no fix for it yet and it's still relevant issue.
ybentz commentedon Jul 19, 2025
Hey, I'm experiencing this issue as well. I'm not sure what the implications are or if it's a terrible idea but setting
textBreakStrategy="simple"(default ishighQuality) fixes it for me in case it helps anyone but hopefully this issue can be fixed properly by RN.kkx64 commentedon Aug 31, 2025
Still very much an issue and
textBreakStrategydoes not help in our caseGertSallaerts commentedon Aug 11, 2026
Not reproducible from 0.81 onward, at least here. Using the snack from this thread unchanged: Expo SDK 53 (RN 0.79) drops the last token, SDK 54 (RN 0.81) renders it whole. Same code, same device (Pixel 6 Pro, Android 13). Also clean on 0.86.2. We didn't test 0.80 (no Expo SDK ships it.)
Probably fixed by #51206 and/or #51303
Fix strict 4-line verse layout wrapping on Android
miniware9 commentedon Nov 20, 2026
Still reproducible on 0.88.1 (New Architecture), with text other than the snack's. Repro: https://github.com/miniware9/react-native-android-letter-spacing-wrap (Expo SDK 58, Android 17 emulator, debug build; its README has the steps).
Each word is a
Textsized by its own content. AtPixelRatio.get()2 (adb shell wm density 320),fontSize: 12, lineHeight: 16, letterSpacing: 0.4(Material's Body Small) breaks "Handle", "Gender", "Spaces", "Cancel" and "Admins" before their last letter, andonTextLayoutreports two lines for each:At 3.5, a Pixel 6 Pro's density (
adb shell wm density 560), this issue's ownlineHeight: 21, letterSpacing: 1.6breaks seven words.0123456789fits on one line at both densities, which may be why the snack looks fixed from 0.81:The same style with
textBreakStrategy="simple", or withoutlineHeight, lays every word out on one line.By reading: a
lineHeightis aCustomLineHeightSpan, aLineHeightSpanand so aParagraphStyle, soBoringLayout.isBoringreturns null andTextLayoutManager.createLayoutlays the text out in aStaticLayoutas wide asceil(Layout.getDesiredWidth(text, paint)), withBREAK_STRATEGY_HIGH_QUALITYby default. With letter spacing, that breaker can still break a word in that width, whereBREAK_STRATEGY_SIMPLEfits it.mainsizes the layout the same way.kagantemizkan commentedon Nov 20, 2026
The cause on Android 15+:
ReactTextViewdraws with the TextView default, bounds-based line breaking (TextView#USE_BOUNDS_FOR_WIDTH, on for apps targeting API 35+), whileTextLayoutManagermeasures with advance-based breaking. With letter spacing a word that fits at measure time wraps at draw time, and the second line falls outside the view. WithoutlineHeightthe text is "boring" and drawn with aBoringLayout, which never wraps, so the bug needslineHeight.Logged on a Redmi (Android 16, targetSdk 36, 0.88.1, release): for "VISIBILITY" at
fontSize: 12, lineHeight: 16, letterSpacing: 0.5, the measure layout is 1 line at 170 px and the drawn TextView layout is 2 lines at the same 170 px. AStaticLayoutbuilt withsetUseBoundsForWidth(true)at that width gives 2 lines, withfalse1 line.#58280 fixes it on main by turning bounds-based breaking off in
ReactTextView, and it is in 0.89.0-rc. With it applied to 0.88.1 the word draws whole. I've asked for it in 0.88: reactwg/react-native-releases#1544.