react / react/react-native

maxFontSizeMultiplier works differently between iOS and Android

オープン
#56,578 コメント 1 件 リアクション 12 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Triage :mag: Platform: Android Platform: iOS
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description
  • maxFontSizeMultiplier affects the fontSize on both Android and iOS.
  • When font scaling is set to a value higher than maxFontSizeMultiplier, both Android and iOS clamp the fontSize value
  • When it comes to lineHeight, it acts differently. iOS clamps the value while Android ignores the maxFontSizeMultiplier for lineHeight

Please see the screenshots for a side-by-side comparison

Steps to reproduce
  1. Install he reproducer app with yarn android and yarn ios
  2. Take a screenshot of the app so you can compare later
  3. Increase the font scaling. You can either use the settings app, or cmd option + on iOS simulator, and adb shell settings put system font_scale <value> on Android
  4. Take another screenshot and compare those two
React Native Version

0.85.2

Affected Platforms

Runtime - iOS, Runtime - Android

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: macOS 15.7.4
  CPU: (12) arm64 Apple M4 Pro
  Memory: 258.47 MB / 48.00 GB
  Shell:
    version: 0.109.1
    path: /Users/burakguner/.cargo/bin/nu
Binaries:
  Node:
    version: 24.13.0
    path: /Users/burakguner/.nix-profile/bin/node
  Yarn:
    version: 1.22.22
    path: /Users/burakguner/.nix-profile/bin/yarn
  npm:
    version: 11.6.2
    path: /Users/burakguner/.nix-profile/bin/npm
  Watchman:
    version: 2026.01.19.00
    path: /Users/burakguner/.nix-profile/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/burakguner/.local/share/gem/ruby/3.3.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "34"
      - "35"
      - "36"
    Build Tools:
      - 35.0.0
      - 36.0.0
      - 36.1.0
    System Images:
      - android-30 | ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-36.1 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.32098.37.2534.15232325
  Xcode:
    version: 26.2/17C52
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.8
    path: /Users/burakguner/.nix-profile/bin/javac
  Ruby:
    version: 3.4.8
    path: /Users/burakguner/.nix-profile/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.85.2
    wanted: 0.85.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
N/A
MANDATORY Reproducer

https://github.com/atlj/reproducer-max-font-size-multiplier-line-height

Screenshots and Videos
Font Scale iOS Android
1 Image Image
2.143 Image Image

Notice how lineHeight is not clamped on Android screenshots

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

必須の再現アプリから始め、yarn androidyarn ios で実行します。issue の設定コマンドを使って、通常および拡大したフォントスケールでスクリーンショットを比較します。完了とは、Android の lineHeight が iOS と一貫して maxFontSizeMultiplier によってクランプされることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, ios, react-native
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。