Skip to content

allowFontScaling = false not working on react native 0.78.1 #51113

@Ahmed-Bilal-01

Description

@Ahmed-Bilal-01

Description

I have developed an app and currently working on it iOS side. By increasing the font size from mobile's setting disturbs all the UI of the app even have applied allowFontScaling = false globally from index.js.

With normal scaling:

Image

With increasing font scale:

Image

my index.js:

import { Text,TextInput, AppRegistry } from "react-native";
import App from "./App";
import { name as appName } from "./app.json";

Text.defaultProps = Text.defaultProps || {};
TextInput.defaultProps = TextInput.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
TextInput.defaultProps.allowFontScaling = false;

AppRegistry.registerComponent(appName, () => App);

Steps to reproduce

  1. yarn install
  2. cd ios
  3. pod install
  4. cd ..
  5. yarn ios

React Native Version

0.78.1

Affected Platforms

Build - MacOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 14.6
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 86.38 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.15.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.9.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2025.04.28.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /usr/local/bin/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: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13363775
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.1
    wanted: 0.78.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

Provided in description

MANDATORY Reproducer

Can be checked by any demo react native 0.78.1 app
https://snack.expo.dev/tyWyGOMwYeNYJH8VuBoJ_

Screenshots and Videos

With normal scaling:

Image

With increasing font scale:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Newer Patch Available

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions