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.

Custom fonts, configureFonts function

See original GitHub issue

You need to specify the ios key of the object needed by the function configureFonts. Just putting a default in there is not enough if you want your font to display on the ios simulator. Not sure if intended or not 😃

{
ios: {
  // needs to be specified
},
 default: {
    regular: {
      fontFamily: 'Lato',
      fontWeight: 'normal',
    },
    medium: {
      fontFamily: 'Lato-Bold',
      fontWeight: 'bold',
    },
    light: {
      fontFamily: 'Lato-Light',
      fontWeight: 'normal',
    },
    thin: {
      fontFamily: 'Lato-Thin',
      fontWeight: 'normal',
    },
  }
}

Issue Analytics

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

github_iconTop GitHub Comments

14reactions
kopaxcommented, Jan 21, 2020

Thanks man that helped me!

const fontConfig = {
  default: {
    regular: {
      fontFamily: 'raleway-regular',
      fontWeight: 'normal',
    },
    medium: {
      fontFamily: 'raleway-medium',
      fontWeight: 'normal',
    },
    light: {
      fontFamily: 'raleway-light',
      fontWeight: 'normal',
    },
    thin: {
      fontFamily: 'raleway-thin',
      fontWeight: 'normal',
    },
  },
};

fontConfig.ios = fontConfig.default;
fontConfig.android = fontConfig.default;
3reactions
ahwelgemoedcommented, Mar 6, 2020

@kopax - Works Thanks - Just note if using for WEB fontConfig.web = fontConfig.default;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fonts · React Native Paper
The easiest way to install custom fonts to your RN project is do as follows: Define path to assets directory with fonts in...
Read more >
React-Native-Paper Theme won't use Custom Fonts
As I am new to react-native-paper , I think my issue is with my fontConfig or configureFonts() . Any help or direction would...
Read more >
Configure fonts in HTML templates - Knowledge Center - Zuora
To load a custom font into the HTML template through the @font-face rule, perform the following steps: Prepare your custom font file that...
Read more >
How To Configure Fonts | inSpired - inSided community
Sign in to a community account with user role Community Manager or ... For this you'll need to inject or link to your...
Read more >
Custom Font Settings (Pro Edition) | ActiveReports 16 .NET ...
Note: The Section Report PDF export does not support font factory settings. Instead, you can configure fonts with GcDocs API (GcImaging and GcPdf)....
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