react / react/react-native

Android system font scaling has no effect on certain cases

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

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

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

説明

Description

On Android, system font scaling values between 1.0 to 1.5 aren't applied properly on certain font sizes. Please see the screenshots below.

Steps to reproduce
Android
  1. Install the app
  2. Use adb shell settings put system font_scale x.x to set font scaling value or change it through setting
  3. Make sure to restart the app after changing the value
iOS
  1. Install the app
  2. Use simulator settings or the settings app to change the font scaling value
  3. Make sure to restart the app after changing the value
React Native Version

0.85.3

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: macOS 15.7.7
  CPU: (12) arm64 Apple M4 Pro
  Memory: 559.30 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.15336583
  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.3
    wanted: 0.85.3
  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-android-broken-font-scaling

Screenshots and Videos

Android

All of these screenshots were taken with an Android 16 emulator. However the issue is reproducible on Android 13, Android 14 and Android 15 as well.

What to look for

In the following screenshots, notice how text with font size 30 isn't scaled properly between font scale 1 to 1.5 (except 1.01 which might be useful to spot the exact bug)

1 1.01 1.1 1.2 1.3 1.5 1.6 2
Image Image Image Image Image Image Image Image
A non React Native App

Here is how the settings app behaves

1.0 1.01 1.1 1.2 1.6
Image Image Image Image Image

iOS

iOS applies font scaling properly

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

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

はじめの一歩

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

調査の方向性

github.com/atlj/reproducer-android-broken-font-scaling にある必須の reproducer から始め、記載されている font_scale の値、特に 1.0–1.5 を使って Android で問題を再現します。Android の挙動を iOS および React Native を使用していない Settings アプリと比較します。報告されている Android のバージョン全体で影響を受けるフォントサイズが正しくスケーリングされ、既存の挙動が維持されれば完了です。

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

評価

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

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

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