Giter VIP home page Giter VIP logo

react-native-custom-fonts's Introduction

Available Fonts

  • HelveticaNeue-Bold
  • HelveticaNeue-Medium
  • Lato-Black
  • Roboto-Bold
  • Roboto-Light
  • Roboto-Medium
  • Roboto-Regular
  • SFProDisplay-Black
  • SFProDisplay-Bold
  • SFProDisplay-Heavy
  • SFProDisplay-Light
  • SFProDisplay-Medium
  • SFProDisplay-Regular
  • SFProDisplay-Semibold
  • SFProDisplay-Thin
  • SFProDisplay-Ultralight
  • SFProText-Bold
  • SFProText-Regular
  • SFProText-Semibold

How to use?

1. Add the following lines in your project's package.json.
"rnpm": {
    "assets": [
      "app/fonts" // Folder including all font files(otf, ttf, ...)
    ]
}
2. Add font files.

Add font files(otf, ttf, ...) in font assets folder.

3. Run the following command.
react-native link

This links all fonts(app/fonts in example) to iOS & Android projects.

4. Add font component.

Add font components(SFProDisplayMedium.js, ...) in your project.

5. Rebuild the project.

You must rebuild the project after add font files.

6. Now, you can use the fonts anywhere in your project.
import { SFProDisplayMedium } from '../SFProDisplayMedium.js';
...
<SFProDisplayMedium style={styles.fontStyle}>
  Text Here
</SFProDisplayMedium>

Demo

You can find demo here.

Welcome to Pull Request!

react-native-custom-fonts's People

Contributors

atoami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

iszubarev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.