Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text 'allowFontScaling' not adjusting font size properly when Emoticons are included in text #23213

Closed
Simek opened this issue Jan 30, 2019 · 5 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Simek
Copy link
Collaborator

Simek commented Jan 30, 2019

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.8.0 - /usr/local/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.7.0 => 16.7.0 
      react-native: 0.58.3 => 0.58.3

Description

As you can see on the screenshot below two lines at bottom do not scales properly with allowFontScaling property set to true. It seems like emoticons are responsible for that behaviour/bug.

img_5806

Removing emoticon from text fixes that issue (second line):

img_bc18d567d6d2-1

It also seems that this bug do not occur in Expo in-browser preview. Maybe iOS global font scaling messing with thing up?

Also I would like to note, that scaling works properly if Text starts with emoji. This my be related to issue #14981.

Reproducible Demo

Run on you own device:
https://snack.expo.io/@simek/text-adjustsfontsizetofit-bug

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.58 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@Simek
Copy link
Collaborator Author

Simek commented Jan 30, 2019

Latest Expo SDK (32.0.0) includes RN 0.57 and that's the reason why I have mentioned this version in environment report. On my machine I'm using the latest RN and I can confirm that on latest version (0.58.3) problem still occurs.

@anoopmm
Copy link

anoopmm commented Feb 4, 2019

'allowFontScaling' not working on nested

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants