You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the way to use custom fonts is to add a link in the index.html. It would be nice if there were a mechanism to link and load them as first-class resources like you can on iOS and Android. I'm not sure how other asset types are handled here.
The text was updated successfully, but these errors were encountered:
When I think about how fonts are loaded in iOS and Android, it's essentially leveraging a configuration option provided by the platform itself, and in the case of the web adding those link tags to the html file is the closest equivalent.
I'm all for a more first-class way to support font loading but unfortunately that isn't really a part of React Native's core and in the early stages of this project I want to focus most on supporting the entirely of the RN core before we move on to creating builtin, web-specific features.
In most cases, if you're itching to get a more streamlined experience you can still implement your own native module which provides that platform specific behavior. For example, like you I wanted to streamline font loading for the demos I was building so I wrote a small native module to allow for loading them from the "react thread": https://gist.github.com/vincentriemer/b8e5e97a92a44638a118016801d378cd
It looks like the way to use custom fonts is to add a link in the index.html. It would be nice if there were a mechanism to link and load them as first-class resources like you can on iOS and Android. I'm not sure how other asset types are handled here.
The text was updated successfully, but these errors were encountered: