@devraj-labs/rn-font-notoserif
v1.0.0
Published
Notoserif font package for React Native
Maintainers
Readme
Notoserif Font for React Native
Noto font, packaged for React Native. Exports a typed weight map (PostScript names) that resolves correctly on both iOS and Android — no Platform.select, no manual fontFamily string guessing.
| | | |---|---| | React Native | 0.60+ | | iOS | ✓ | | Android | ✓ |
Install
npm install @devraj-labs/rn-font-notoserifThen add (or update) react-native.config.js in your app root to include the font assets:
module.exports = {
assets: [
'./node_modules/@devraj-labs/rn-font-notoserif/assets/fonts',
// ...other font packages
],
};Then link the fonts into your native projects:
npx react-native-assetRe-run npx react-native-asset and rebuild your app whenever you add or update a font package.
Usage
With Vajra UI
Register the font in your theme and use it via the font prop:
import { notoFonts } from '@devraj-labs/rn-font-notoserif';
createVajraTheme({
typography: {
fonts: {
families: {
...notoFonts,
},
},
},
});<Text font="notoSerif" fontWeight="100">Sample text</Text>
<Text font="notoSerif" fontWeight="200">Sample text</Text>Without Vajra UI
The export is a plain object — use it however your app resolves fonts:
import { notoFonts } from '@devraj-labs/rn-font-notoserif';
const styles = StyleSheet.create({
// notoFonts.notoSerif['100'] → 'NotoSerif-Thin'
heading: { fontFamily: notoFonts.notoSerif['100'], fontSize: 24 },
body: { fontFamily: notoFonts.notoSerif['900'], fontSize: 16 },
});Font map
| Family | Weight | PostScript name |
|--------|--------|-----------------|
| notoSerif | '100' | 'NotoSerif-Thin' |
| notoSerif | '200' | 'NotoSerif-ExtraLight' |
| notoSerif | '300' | 'NotoSerif-Light' |
| notoSerif | '400' | 'NotoSerif-Regular' |
| notoSerif | '500' | 'NotoSerif-Medium' |
| notoSerif | '600' | 'NotoSerif-SemiBold' |
| notoSerif | '700' | 'NotoSerif-Bold' |
| notoSerif | '800' | 'NotoSerif-ExtraBold' |
| notoSerif | '900' | 'NotoSerif-Black' |
Docs
- Using a font package — full usage guide including Vajra UI and standalone examples
- Creating a font package — how this package was built from the template
- README generation — how this file is auto-generated
License
MIT
