Skip to content

Vestaboard/expo-native-fonts

 
 

Repository files navigation

expo-native-fonts

This module is for adding custom fonts to native iOS extensions, for example if you use my expo widgets module.

Installation

npx expo install @bittingz/expo-native-fonts

Setup

To add fonts, simply create a folder and drop iOS compatible fonts (e.g. ttf files) in there. Then add the following to your expo app.config.(ts/js) plugins array:

"@bittingz/expo-native-fonts",
    {
        "srcFolder": "./fonts",
            "fonts": [
            {
                "filePath": "Montserrat/Montserrat-Bold.ttf",
                "targets": [
                    "expowidgetsWidgetExtension"
                ],
                "platform": "ios"
            }
        ]
    }

srcFolder should relative path from your project root to the fonts folder. fonts is an array of fonts to inject

Each item of fonts must have the file path, the targets it is to be injected into and the platform. Android is not yet supported.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 32.9%
  • Java 31.9%
  • Ruby 13.0%
  • Objective-C++ 10.7%
  • JavaScript 8.2%
  • Kotlin 1.8%
  • Other 1.5%