expo / vector-icons

https://icons.expo.fyi
MIT License
650 stars 113 forks source link

How does this work with auto linking? #134

Closed arlyon closed 3 years ago

arlyon commented 4 years ago

Is there anywhere I can define the fonts I need in the project?

brentvatne commented 3 years ago

this is an old issue but i will go ahead and answer it anyways.

this @expo/vector-icons uses expo-font, which can load fonts at runtime (these can be cached - https://docs.expo.io/guides/preloading-and-caching-assets/#pre-loading-and-caching-assets)

the default configuration in expo apps is to bundle every asset that is imported (require/import somewhere in the app js) in the app binary when it's built, and then expo-font will read the font from there instead of over the network. you can customize this with assetBundlePatterns: https://docs.expo.io/guides/preloading-and-caching-assets/#bundling-assets