Allows loading fonts from the web and using them in React Native components. See more detailed usage information in the Using Custom Fonts guide.
Exponent.Font.loadAsync(name, url)
Load a font from the web and associate it with the given name.
fontFamily
. For example, if the name is 'open-sans'
then your Text
component would look like: <Text style={{fontFamily: 'open-sans'}}>Hello world</Text>
Doesn’t return anything and simply awaits till the font is available to use.
Exponent.Font.loadAsync(map)
Convenience form of Exponent.Font.loadAsync()
that loads multiple fonts at once.
Exponent.Font.loadAsync()
.Doesn’t return anything and simply awaits till all fonts are available to use.
Exponent.Font.loadAsync({
title: '[http://url/to/font1.ttf'](http://url/to/font1.ttf%27),
cursive: '[http://url/to/font2.ttf'](http://url/to/font2.ttf%27),
});
This is equivalent to calling Exponent.Font.loadAsync()
once per name and URL pair.
© Copyright 2025, Exponent. Created using Gatsby.