Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

React Native Custom Fonts 📚

License

NotificationsYou must be signed in to change notification settings

atoami/react-native-custom-fonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

  • 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';...<SFProDisplayMediumstyle={styles.fontStyle}>TextHere</SFProDisplayMedium>

Demo

You can find demohere.

Welcome to Pull Request!

About

React Native Custom Fonts 📚

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp