react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Font weight issue on React Native 0.83 when using custom font

Open jaredrkozar opened this issue 1 month ago • 1 comments

Description

I'm currently working on an app that's using a custom font, and am noticing a weird issue that has to do with font weight. Note that this issue only occurs on iOS; it looks fine when running on Android.

On React Native 0.82.1, when rendering a Text component with the style

sampleText: { fontFamily: [custom font, regular font weight], fontWeight: '200', fontSize: 30 },

our text looked good. (It's the first screenshot posted below)

However, on React Native 0.83, when rendering text with the exact same style, I noticed that the font weight was much thicker than I expected it to be. (See the second screenshot). I noticed that if I removed "fontWeight: 200" from the associated style, then it looked better, and it rendered as I expected it to.

Is this an intentional change?

This reddit post might be related to this issue

Steps to reproduce

  1. Create a Text component
  2. In its associated style in the stylesheet, add custom font and set a font weight
  3. if you’re running on React Native 0.83, the font weight should be thicker than expected

React Native Version

0.83.0

Affected Platforms

Runtime - iOS

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

info Fetching system and libraries information...
System:
  OS: macOS 26.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 130.11 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.20.0
    path: /Users/jkozar/.nvm/versions/node/v22.20.0/bin/node
  Yarn:
    version: 4.6.0
    path: /Users/jkozar/.nvm/versions/node/v22.20.0/bin/yarn
  npm:
    version: 10.9.3
    path: /Users/jkozar/.nvm/versions/node/v22.20.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.1
      - iOS 26.1
      - macOS 26.1
      - tvOS 26.1
      - visionOS 26.1
      - watchOS 26.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.26094.121.2512.13840223
  Xcode:
    version: 26.1/17B55
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.8
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.0
    wanted: patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

This isn’t a crash - it’s an issue with a custom font.

MANDATORY Reproducer

None

Screenshots and Videos

Here’s what this issue looks like on React Native 0.82.1

Image

Here’s what it looks like on React Native 0.83

Image

jaredrkozar avatar Dec 18 '25 21:12 jaredrkozar

[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


You can read more about about it on our website: How to report a bug.

react-native-bot avatar Dec 18 '25 21:12 react-native-bot

I have same issue +1

ertucaglar avatar Dec 19 '25 19:12 ertucaglar

same issue

Image

mustafaabobakr avatar Dec 21 '25 19:12 mustafaabobakr

Facing similar issue.

SameedSharif-cmyk avatar Dec 23 '25 05:12 SameedSharif-cmyk

Thank you for making a PR to fix this bug @ptptsw

jaredrkozar avatar Dec 26 '25 01:12 jaredrkozar

Facing same issue

uday-zluck avatar Dec 31 '25 05:12 uday-zluck

Issue (RN 0.83, iOS)

When using custom fonts on iOS, setting both fontFamily and fontWeight can make text look overly bold.

{
  fontFamily: 'YourFont-Regular',
  fontWeight: '600',
}

Why this happens iOS applies fontWeight on top of the font file’s built-in weight, so the weight ends up being applied twice.

Recommended fix ✅ Use the specific PostScript font name and don’t set fontWeight on iOS.

{
  fontFamily: 'Montserrat-SemiBold',
}

Alternative If you want to keep the same style object, only apply fontWeight on Android.

{
  fontFamily: 'YourFont-Regular',
  ...(Platform.OS === 'android' ? { fontWeight: '600' } : {}),
}

Notes PostScript font names already include the correct weight. iOS loads that exact font file, so removing fontWeight prevents the extra weight transformation.

uday-zluck avatar Jan 01 '26 11:01 uday-zluck