Skip to content

Emojis inside <Text> increase line-height or stretch the element on iOS #47621

Open

Description

@mhoran

Description

Reported previously in #18559. Emojis within <Text> elements are not aligned with other text in the same text element or other text elements on screen. They also cause the height of the <Text> to increase disproportionate to the fontSize.

As a workaround, the fontFamily of the emoji can be set to System. The referenced Snack shows this behavior. The emoji is rendered initially with the Menlo font family and overridden to System when the override button is pressed. When overridden, the strikethrough more closely aligns with the text, though is not perfectly aligned like on Android.

This issue no longer seems to be reproducible on Android.

Steps to reproduce

  1. Launch the Snack
  2. Note that the strikethrough does not align with the emoji nor the text to the right
  3. Click Override
  4. Note that the strikethrough more closely aligns with the emoji and the text on the right

React Native Version

0.76.1

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.7.1
  CPU: (16) arm64 Apple M3 Max
  Memory: 3.73 GB / 48.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.5
    path: /opt/homebrew/opt/node@18/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: /opt/homebrew/opt/node@18/bin/npm
  Watchman:
    version: 2024.11.11.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: ^15.1.2
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

None

Reproducer

https://snack.expo.dev/@mhoran/hazardous-orange-celery

Screenshots and Videos

Without override With override
Screenshot 2024-11-14 at 4 02 20 PM Screenshot 2024-11-14 at 4 02 27 PM

Activity

  1. react-native-bot commented on Nov 14, 2024

    @react-native-bot
    Collaborator

    Tip

    Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.2. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

  2. react-native-bot commented on Nov 14, 2024

    @react-native-bot
    Collaborator

    Tip

    Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

  3. mhoran commented on Nov 14, 2024

    @mhoran
    ContributorAuthor

    This is still an issue in 0.76.2.

  4. Suptohita commented on Jan 7, 2025

    @Suptohita

    Did you find any solution to that?

    This is still an issue in 0.76.2.

  5. mhoran commented on Jan 7, 2025

    @mhoran
    ContributorAuthor

    There is no proper fix for this issue that I have found. However, the workaround of setting the fontFamily of emoji characters to System continues to work. You can do this with something like react-native-parsed-text and emoji-regex to apply fontFamily: 'System' style to emoji characters.

    https://github.com/mhoran/weechatRN/blob/787598e6d2b97e75e9287c84e4ab0aae72b70fbf/src/lib/helpers/parse-text-args.ts#L33-L36

  6. react-native-bot commented on Jul 7, 2025

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  7. react-native-bot commented on Jul 7, 2025

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  8. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jul 7, 2025
  9. mhoran commented on Jul 7, 2025

    @mhoran
    ContributorAuthor
  10. eastroot1590 commented on Jul 14, 2025

    @eastroot1590

    same issue

  11. forchello commented on Sep 29, 2025

    @forchello

    Hello everyone, my decision is to use TextInput instead of the usual Text

    <Text style={styles.exampleTitle}>Text Component</Text>
    <Text style={styles.exampleText}>
      {t('example')}
    </Text>
    
    <Text style={styles.exampleTitle}>TextInput Component</Text>
    <TextInput
      style={styles.exampleText}
      value={t('example')}
      multiline
      editable={false}
      focusable={false}
      selectTextOnFocus={false}
      contextMenuHidden             
      caretHidden
      showSoftInputOnFocus={false}
      pointerEvents="none"
    />
    

    and your styles

    exampleTitle: {
      fontFamily: 'yourFontFamily',
      fontSize: 18,
      lineHeight: 24,
      color: colors.black,
    },
    exampleText: {
      padding: 0, // Important for TextInput
      fontFamily: 'yourFontFamily',
      fontSize: 16,
      lineHeight: 20,
      color: colors.black,
    }
    

    Result

    Image
  12. rklf commented on Jan 7, 2026

    @rklf

    Same issue. Any solution which avoid workarounds?

  13. react-native-bot commented on Jul 7, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  14. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jul 7, 2026
  15. fbartho commented on Jul 7, 2026

    @fbartho
    Contributor

    Still a problem

  16. mhoran commented on Jul 7, 2026

    @mhoran
    ContributorAuthor
  17. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions