Ui: Unrecognized font family 'Rubik-Regular'

Created on 7 Mar 2018  路  9Comments  路  Source: shoutem/ui

react-native-cli: 2.0.1
react-native: 0.52.0

"@shoutem/ui": "^0.23.4",

I already run react-native link but still, I get Unrecognized font family 'Rubik-Regular'

Most helpful comment

This was broken for me too, restarting the server did nothing. Also none of the previous fixes worked. Just a good reason not to use this lib.

All 9 comments

I got into this issue too but just restart server and it should work fine.

This was broken for me too, restarting the server did nothing. Also none of the previous fixes worked. Just a good reason not to use this lib.

You might need to load the fonts when your app starts.
Check this example out:
https://github.com/shoutem/ui/blob/develop/examples/create-react-native-app/App.js

Please let me know if it solves your problem.

@alainpatrick I followed that link, but that would require running this as an expo app. Any idea how to get rid of this error without importing any expo dependencies ? I initiazed the project by running react-native init rather than create-react-native-app

Hope this helps.

I restart server is no working but when i try to type command react-native link and run ios then its working.

This is still an issue. I'm saddened as the UI components in this library really look pretty.

Something obviously went wrong with react native link in the case where you have run the code.
If all else fails, that is the named font in reference is not found in android assets or ios resources, then check font folder in shoutem ui node_modules copy the fonts to your assets in android and import them into resources folder in ios, add reference to plist (under font provided by application) and the file path and ref is in copy bundle resource under Project file > build phases

Clean build folder and node_modules then link ( react-native link ) dependencies fixed the issue.

Thanks for your support guys 馃檹

Was this page helpful?
0 / 5 - 0 ratings