Repository navigation
Closed as not planned
Labels
DebuggingIssues related to React Native DevTools or legacy JavaScript/Hermes debuggingIssues related to React Native DevTools or legacy JavaScript/Hermes debuggingNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Platform: AndroidAndroid applications.Android applications.
Description
Description
When running the app in debug mode on Android 15 using the old architecture, text spacing appears incorrect after refreshing the app. I'm noticing that issue also in our Android release app using rn 0.78.3
- The issue does not occur when using the new architecture.
- The issue also occurs in React Native 0.81 with the old architecture.
- It does not occur on Android 13
- It does not occur on iOS
Steps to reproduce
https://github.com/roni-castro-shipt/rn-android-15-font-issue
- npm install
- Create an Android 15 emulator or a physical device with that OS version
- npm run android
- Refresh the app by pressing
rin Metro Terminal, orrrinside the app.
React Native Version
0.81.0
Output of npx @react-native-community/cli info
System:
OS: macOS 15.6
CPU: (8) arm64 Apple M3
Memory: 186.89 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.18.1
path: ~/.nvm/versions/node/v20.18.1/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v20.18.1/bin/yarn
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v20.18.1/bin/npm
Watchman:
version: 2025.06.23.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/ronidecastro/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- visionOS 2.5
- watchOS 11.5
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "35"
- "36"
Build Tools:
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
- 35.0.0
- 36.0.0
System Images:
- android-28 | Google ARM64-V8a Play ARM 64 v8a
- android-30 | Google APIs ARM 64 v8a
- android-31 | Google Play ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Desktop ARM 64 v8a
- android-34 | Android TV ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Wear OS 5.1 - Preview ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-35 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
- android-35 | Pre-Release 16 KB Page Size Google APIs ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.25410.109.2511.13665796
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.13
path: /usr/bin/javac
Ruby:
version: 3.1.4
path: /Users/ronidecastro/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.81.0
wanted: 0.81.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Screenshots and Videos
weird-spacing-refresh.mp4
android_15_moto_g54.mp4
Reacted by Irek Róg, Sergey Kravchyonok and Caleb Davenport
Metadata
Metadata
Assignees
Labels
DebuggingIssues related to React Native DevTools or legacy JavaScript/Hermes debuggingIssues related to React Native DevTools or legacy JavaScript/Hermes debuggingNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Platform: AndroidAndroid applications.Android applications.

Activity
react-native-bot commentedon Aug 15, 2025
Warning
Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.
react-native-bot commentedon Aug 15, 2025
Warning
Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.
[-]Android 15 - Incorrect lineHeight on Text in debug mode[/-][+]Android 15 - Incorrect lineHeight on Text[/+]react-native-bot commentedon Sep 12, 2025
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
react-native-bot commentedon Sep 19, 2025
This issue was closed because the author hasn't provided the requested feedback after 7 days.
zewillze commentedon Sep 22, 2025
hello, any solution for this issue?
roni-castro-shipt commentedon Sep 23, 2025
This could be related to the Android text view changes, and react-native not supporting it correctly. React-native is not supporting legacy architecture anymore, so I don't think they will fix that =/
This solves the example I shared:
android/app/src/main/res/values/styles.xml
Screen.Recording.2025-09-23.at.13.16.40.mov
if it does not solve, try disabling other stuff in there, or try this one, if you also have problems with text input
pierroo commentedon Sep 29, 2025
FYI it also happens with new architecture, so hopefully RN team looks into it.
I also created an issue about text being cut:
#53666
crafts69guy commentedon Aug 5, 2026
The
styles.xmloverride posted in this thread also fixes horizontal clipping, not just the line-height problem — and it turns out italic fonts aren't the only trigger. Full write-up in #53286; the essentials, since they're relevant here:Another data point, plus a reusable Expo config plugin for the
styles.xmlworkaround.It is not only italic fonts — Vietnamese diacritics hit this too
The Android 15 docs frame
useBoundsForWidtharound italics, so this is easy to dismiss if you don't ship an italic face. But it fires for any glyph whose ink overhangs the advance width the font reserves for it, and Vietnamese stacked diacritics qualify:ế,ở,ằ,ữ.The symptom that cost us the most time is that it is per-glyph, not per-length, so sibling labels of the same size and font disagree:
Tất cảPha chếPhaĐang mởĐangĐIỂM ĐỔI QUÀĐIỂM ĐỔIIt only becomes visible where a container hugs its text (badges, chips, pills). Everywhere else the few missing pixels are absorbed by surrounding space, which makes it look random.
Because the mismatch is in how the platform measures text, nothing on the JS side fixes it. In case it saves someone the same detour, these all failed for us:
flexShrink: 0,numberOfLines={1},alignSelf: "stretch", extra horizontal padding, embedding the fonts at build time via theexpo-fontplugin instead ofuseFonts, and replacing spaces withU+00A0. The last one is worth calling out because it looks like it works — it only converts "drops the last word" into "clips mid-character", since the node is still too narrow.Version status (verified against the published tags)
useBoundsForWidthinTextLayoutManager.kt:TIRAMISU. (The CHANGELOG lists 8347cc4 underv0.83.2, but it is not in the 0.83.4 tag or the published npm package.)ReactNativeFeatureFlags.fixTextClippingAndroid15useBoundsForWidth(), which defaults tofalseinReactNativeFeatureFlagsDefaults.kt.So upgrading alone does not fix it — on 0.84+ you also have to turn the flag on.
Workaround as an Expo config plugin
The
styles.xmloverride posted above works, but Expo projects using CNG (no checked-inandroid/) can't edit that file directly. This plugin applies it on every prebuild:Add
"./plugins/with-android-text-metrics"topluginsinapp.config.js. It is idempotent, so repeated prebuilds don't duplicate entries. Needs a native rebuild — it can't ship over the air.Confirmed fixed on device with RN 0.83.4 / Expo SDK 55, new architecture,
compileSdk36.Two caveats worth knowing before you copy it:
useBoundsForWidthoff is a deliberate return to the pre-15 behaviour, which is exactly what Android changed to stop overhanging glyphs being clipped. If you do ship an italic or heavily-overhanging face, check it after applying this.shiftDrawingOffsetForStartOverhangis already the platform default (Android doesn't add the left padding even when targeting 35+), so that line is belt-and-braces rather than load-bearing.