question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested <Text/> ignores allowFontScaling={false}

See original GitHub issue

Environment:

OS: macOS High Sierra 10.13.6 Node: 10.4.1 Yarn: 1.7.0 npm: 6.1.0 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed)

react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: 0.54.3 => 0.54.3

The same issue with RN v0.55.4 and others

Description

Project is created via react-native init I use Text.defaultProps.allowFontScaling = false to disable text scaling anywhere in project. It works well. But when use nested texts on Android, this props doesn’t work on children even if I pass allowFontScaling={false} directly

I tried to create Expo Snack Example, but it works with CRNA.

Reproducible Demo

<Text allowFontScaling={false}>
    <Text allowFontScaling={false}>
        This text ignores allowFontScaling
    <Text/>
    <Text allowFontScaling={false}>
        And this too
    <Text/>
<Text/>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

3reactions
react-native-botcommented, Nov 17, 2018

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

0reactions
anoopmmcommented, Feb 4, 2019

is there any update? I have still on 0.58.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is allowFontScaling=false in <Text/> component a bad practice?
As mentioned in this answer. Yes, using allowFontScaling=false in <Text/> component is a bad practice. Because endusers may prefer the font ...
Read more >
Text - React Native - W3cubDocs
A React component for displaying text. Text supports nesting, styling, and touch handling. In the following example, the nested title and body text...
Read more >
react-native-render-html - npm
allowFontScaling, Specifies whether fonts should scale to respect Text Size accessibility settings, boolean, true.
Read more >
createStackNavigator - React Navigation
Defaults to false. This is ignored in the web platform. Visual options: mode - Defines the style for rendering and transitions:.
Read more >
wix-react-native-text-size - NPM Package Overview - Socket.dev
Start using Socket to analyze wix-react-native-text-size and its 0 ... textBreakStrategy (Android); letterSpacing; allowFontScaling ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found