Skip to content

Provide a way to subset the vendored icon fonts #337

@yuhr

Description

@yuhr

Reading the documentation, from my naïve interpretation it seems like this library is embedding the entire font file into the bundle:

As with any custom font in Expo, you can preload icon fonts before rendering your app. The font object is available as a static property on the font component. So, in the case above, it is Ionicons.font, which evaluates to {ionicons: require('path/to/ionicons.ttf')}.

Typical users don't want to include the entire icon set, but just a few icons out of it. We can do subsetting manually and load it as a custom icon font, but it would be better if @expo/vector-icons can handle this scenario, maybe by providing a config plugin or somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions