-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Open
Labels
Component: TextInputRelated to the TextInput component.Related to the TextInput component.Needs: Author FeedbackNeeds: Version InfoPlatform: iOSiOS applications.iOS applications.
Description
Description
When using fontFamily: 'Hiragino Sans' on a on iOS, two rendering issues occur:
- Text selection shows extra space below the text — When selecting text in a multiline TextInput, the selection highlight area extends significantly below the actual text glyphs, creating a large visible gap.
- Text is clipped at the bottom in single-line TextInput — Characters with descenders (e.g., p, y, j) are cut off at the bottom. This occurs with both placeholder and actual input text.
Both issues do not occur when using the default system font (San Francisco). This appears to be caused by the font metrics (ascender/descender ratio) of Hiragino Sans not being properly accounted for in TextInput's rendering.
Note: Hiragino Sans is a system-bundled font on iOS, widely used for Japanese typography.
Steps to reproduce
- Create a with style={{ fontFamily: 'Hiragino Sans', fontSize: 16 }}
- Issue 1: In a multiline TextInput, type text (e.g., "Hello World") and select it — observe extra space below the selection highlight
- Issue 2: Observe the single-line TextInput with text "https://example.com/yyy.jp" — the bottom of characters like p, y, j is clipped. This happens for both defaultValue and placeholder.
- Compare with the system font TextInput — neither issue occurs
React Native Version
0.83
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 15.1
CPU: (8) arm64 Apple M2
Binaries:
Node: 20.19.0
SDKs:
iOS SDK: 18.1
IDEs:
Xcode: 16.1/16B40
Stacktrace or Logs
N/A (visual rendering issue, no errors)
MANDATORY Reproducer
https://snack.expo.dev/@ryotanny/hiragino-sans-textinput-bug
Screenshots and Videos
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: TextInputRelated to the TextInput component.Related to the TextInput component.Needs: Author FeedbackNeeds: Version InfoPlatform: iOSiOS applications.iOS applications.