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.

`configureFonts` not working with `default` key

See original GitHub issue

I just want to reopen #1720, as the issue still persists.

Setting just default key inside fontConfig doesn’t do anything.

As mentioned in the docs it should override the config on all platforms:

Note: To override font on all platforms use default key.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
selrondcommented, Jul 29, 2020

@raajnadar I did work around it eventually:

const fontConfig = {
  regular: {
    fontFamily: iOSUIKit.body.fontFamily,
    fontWeight: systemWeights.regular.fontWeight,
  },
  medium: {
    fontFamily: iOSUIKit.body.fontFamily,
    fontWeight: systemWeights.semibold.fontWeight,
  },
  light: {
    fontFamily: iOSUIKit.body.fontFamily,
    fontWeight: systemWeights.light.fontWeight,
  },
  thin: {
    fontFamily: iOSUIKit.body.fontFamily,
    fontWeight: systemWeights.thin.fontWeight,
  },
}

const fonts = configureFonts({
  default: fontConfig,
  android: fontConfig,
  ios: fontConfig,
})

but the docs state it should be possible to do just by setting default key, which doesn’t work; and which is the point of this issue

0reactions
selrondcommented, Oct 6, 2020

What’s wrong with this?

If the issue is still present in the latest version, please leave a comment within 7 days to keep it open

I immediately replied

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native-Paper Theme won't use Custom Fonts
I have the theme working to format my components, however when I try to incorporate custom fonts it does not have any effect...
Read more >
10.6. Configuring Fonts Red Hat Enterprise Linux 7
Make sure that the font cache is updated by running the following command: ... Fonts Tweak Tool may not be installed by default...
Read more >
Configure Fonts and Set Style - GCDocuments - GrapeCity
If the folder path to the font is not specified and the user is working on Windows OS, the path "C:\Windows\Fonts" will be...
Read more >
Fonts · React Native Paper
After you have to pass the fontConfig into configureFonts method in a custom theme. Note: To override font on all platforms use default...
Read more >
How To Configure Fonts | inSpired - inSided community
How To Configure Fonts. 4 years ago ... Click the purple Theme button and select Fonts ... More information on working with font-family ......
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