Code Monkey home page Code Monkey logo

Comments (3)

JoMarchant avatar JoMarchant commented on June 19, 2024

Hey there, I had the same problem some weeks ago, installing the individual font families fixed this for me. I also had to remove 'fontWeight' property from all of my fonts' config. Example code below:

export const fonts {
  titleLarge: {
    fontFamily: 'RedHatDisplay-ExtraBold',
    fontSize: 34,
    letterSpacing: 0.37,
    lineHeight: 41,
  },
  bodyMedium: {
    fontFamily: 'RedHatDisplay-Medium',
    fontSize: 16,
    letterSpacing: 0.36,
    lineHeight: 34,
  },
  bodySmall: {
    fontFamily: 'RedHatDisplay-Regular',
    fontSize: 14
    letterSpacing: 0.35,
    lineHeight: 46,
  },
...
};

This way I set the fontWeight using the specific fontFamily I installed. I also tried using some variable fonts but it seems those aren't compatible yet.

So I'd try removing fontWeight from your fonts' config, and setting it just with fontFamily.

Here's another useful issue you could check: facebook/react-native#42116

from react-native-paper.

ranjkkum avatar ranjkkum commented on June 19, 2024

thanks for your response.. i tried removing fontWeight but somehow its still not working ..

from react-native-paper.

JoMarchant avatar JoMarchant commented on June 19, 2024

Only other thing is I noticed you're importing Text from "react-native". I don't know if you're also importing it that way in other modules but it should be imported from "react-native-paper". That way it'll properly use the fonts provided by your theme.

from react-native-paper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.