A basic React Native module that exposes the operating system's installed fonts and available font families. It ships with a single function: .get()
.
Yarn:
yarn add react-native-font-list
NPM:
npm install react-native-font-list --save
cd ios && pod install
That's it! You are ready to use FontList.
// import
import FontList from 'react-native-font-list';
// sample use case
const [availableFontFamilies, setAvailableFontFamilies] = useState([]);
const [installedFonts, setInstalledFonts] = useState([]);
FontList.get((fontFamilies, fonts) => {
setAvailableFontFamilies(fontFamilies);
setInstalledFonts(fonts);
});