Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/readyfluent/react-native-font-list
A basic React Native module that exposes the operating system's installed fonts and available font families.
https://github.com/readyfluent/react-native-font-list
android font ios react-native ready-fluent
Last synced: 4 months ago
JSON representation
A basic React Native module that exposes the operating system's installed fonts and available font families.
- Host: GitHub
- URL: https://github.com/readyfluent/react-native-font-list
- Owner: ReadyFluent
- License: mit
- Created: 2020-02-08T05:35:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T17:34:47.000Z (about 2 years ago)
- Last Synced: 2024-10-15T16:05:59.925Z (4 months ago)
- Topics: android, font, ios, react-native, ready-fluent
- Language: Java
- Homepage: https://www.npmjs.com/package/react-native-font-list
- Size: 956 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-font-list
A basic React Native module that exposes the operating system's installed fonts and available font families. It ships with a single function: `.get()`.## Installation
### Add Dependency
Yarn:`yarn add react-native-font-list`
NPM:
`npm install react-native-font-list --save`
### Update Pods (iOS)
`cd ios && pod install`That's it! You are ready to use FontList.
## Usage
```javascript
// 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);
});
```## License
[View License](/LICENSE);