How to use the @expo/vector-icons.Entypo.font function in @expo/vector-icons

To help you get started, we’ve selected a few @expo/vector-icons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / native-component-list / App.tsx View on Github external
async _loadAssetsAsync() {
    try {
      const iconRequires = Object.keys(Icons).map(key => Icons[key]);

      const assetPromises: Promise[] = [
        Asset.loadAsync(iconRequires),
        Asset.loadAsync(StackAssets),
        // @ts-ignore
        Font.loadAsync(Ionicons.font),
        // @ts-ignore
        Font.loadAsync(Entypo.font),
        // @ts-ignore
        Font.loadAsync(MaterialIcons.font),
        Font.loadAsync({
          'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
        }),
      ];
      if (Platform.OS !== 'web')
        assetPromises.push(
          Font.loadAsync({
            Roboto: 'https://github.com/google/fonts/raw/master/apache/roboto/Roboto-Regular.ttf',
          })
        );
      await Promise.all(assetPromises);
    } catch (e) {
      console.log({ e });
    } finally {

@expo/vector-icons

Built-in support for popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.

MIT
Latest version published 2 years ago

Package Health Score

76 / 100
Full package analysis