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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@react-native-hero/font-icon

v0.0.5

Published

react native font icon

Readme

@react-native-hero/font-icon

This module is used to add custom fonts.

By the way, you can also add custom font icons.

Getting started

Install the library using either Yarn:

yarn add @react-native-hero/font-icon

or npm:

npm install --save @react-native-hero/font-icon

Link

  • React Native v0.60+

For iOS, use cocoapods to link the package.

run the following command:

$ cd ios && pod install

For android, the package will be linked automatically on build.

  • React Native <= 0.59

run the following command to link the package:

$ react-native link @react-native-hero/font-icon

Steps

react-native-asset is recommend.

  1. Download your font file, such as abc.ttf.

  2. Put the font file in the <project>/assets/fonts folder.

  3. Edit <project>/react-native.config.js, add the assets.

module.exports = {
  assets: ['./assets/fonts'],
};
  1. Run react-native-asset.

  2. At this point, the font is installed, but you don't know the fontFamily of the font.

  3. Call enumFonts() on ios, you will get a fonts array, and you will find the fontFamily from the array.

import {
  enumFonts,
} from '@react-native-hero/font-icon'

enumFonts().then(data => {
  console.log(data.fonts)
})
  1. Here comes the core step, ios needs the fontFamily, but android just needs the font file name.

  2. If the font file name is not the fontFamily, you should to change the file name to the fontFamily, then run react-native-asset again.

  3. If you just need a new font, that's all.

  4. If you need a font icon, see the example below.

  5. Sorry for my english, may be you can provide a better explanation.

Example

import {
  createFontelloIcon,
  createIcomoonIcon,
} from '@react-native-hero/font-icon'

// config is a json downloed from fontello
const FontelloIcon = createFontelloIcon(config)

// config is a json downloed from icomoon
const IcomoonIcon = createIcomoonIcon(config)

// then you can use the Icon Component
<FontelloIcon
  size={14}
  color="#666"
  name="like"
  style={{
    marginLeft: 4
  }}
/>