npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-native-fonts

v0.0.6

Published

> Load fonts on iOS and Android using native code.

Readme

expo-native-fonts

Load fonts on iOS and Android using native code.

Traditionally, loading fonts in an Expo project requires using the expo-fonts library. While this has historically been a great solution, it has to load the fonts at runtime which necessitates you to show the splash screen.

With expo-native-fonts, font files are loaded via native code. What does that mean?

Fonts will be available immediately at runtime.

No more long splash screens!

You can change the font family, weight, and style individually.

No more fontFamily: 'Raleway-BoldItalic'!

Installation

  1. Install the package:

    yarn add expo-native-fonts
  2. Add your font files to a directory (we recommend assets/fonts):

    app/
    assets/
    |- fonts/
       |- Raleway-Black.ttf
       |- Raleway-BlackItalic.ttf
       |- ...
  3. Add the plugin to your app.json config:

    {
      "expo": {
        "plugins": [
          [
            "expo-native-fonts",
            {
              "Raleway": [
                {
                  "path": "./assets/fonts/Raleway-Black.ttf",
                  "weight": 900
                },
                {
                  "path": "./assets/fonts/Raleway-BlackItalic.ttf",
                  "weight": 900,
                  "style": "italic"
                }
                // ...
              ]
            }
          ]
        ]
      }
    }
  4. Rebuild your app as described in the "Adding custom native code" guide

  5. Start using the newly-defined font in your style objects:

    const styles = StyleSheet.create({
      text: {
        fontFamily: "Raleway",
        fontWeight: "900",
        fontStyle: "italic",
      },
    });

Gotchas

Supported Font Files

This plugin has only been tested with .ttf and .otf files.

The use of other file types may not work!

Font Family Name

The key you use to define a family in the plugin config must exactly match the actual font family name defined in the font files.

To find the family name:

  1. Install the lcdf-typetools package:

    brew install lcdf-typetools
  2. Run the following on one of the font files:

    otfinfo --family Raleway-Regular.ttf
  3. The printed value is the family name to use.

    For example, if the command printed Matter, you should format your config like so:

    {
      "expo": {
        "plugins": [
          [
            "expo-native-fonts",
            {
              "Matter": [
                // ...
              ]
            }
          ]
        ]
      }
    }

Contributing

Check out our Contributing guide for more information on reporting issues, submitting feedback, or contributing code.

Setup

To set up the repository locally on your machine, follow these steps:

  1. Install the project dependencies:

    yarn
  2. Create a new build:

    yarn build

Testing

To test that the project works, set up an example project app using create-expo-app and follow these steps:

  1. In this repo, link the project:

    yarn link
  2. In your example project repo, link the dependency:

    yarn link expo-native-fonts
  3. In your example project repo, run the prebuild command:

    yarn expo prebuild --clean

Credits

Major props to @jsamr for their documentation on supporting fonts natively: https://github.com/jsamr/react-native-font-demo