Skip to content

Commit 056a566

Browse files
Merge branch 'fonts' into 'main'
feat(font): added Roboto as default font See merge request react-native/react-native-material-components!20
2 parents c4f70fb + 03f54c1 commit 056a566

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+293
-5
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,33 @@ export const MySubmitButton: React.FC<TouchableOpacityProps> = ({style, ...props
136136

137137
## Basic usage
138138

139-
You don't need extra steps to use the default typography via whole app. The default font is Roboto for Android and san Francisco for IOS.
139+
The default font used in this library is Roboto. While no additional setup is required for Android, you will need to perform a few extra steps to configure it on iOS.
140+
141+
### Android
142+
143+
No additional steps are needed for Android. The Roboto font is bundled and ready to use.
144+
145+
### IOS
146+
147+
1. Create the ```react-native.config.js``` file
148+
149+
In the root of your project, create a ```react-native.config.js``` file with the following content:
150+
151+
```
152+
module.exports = {
153+
assets: ['node_modules/react-native-material-components/ios/fonts'],
154+
};
155+
```
156+
157+
2. Run the Asset Linking Command
158+
159+
Run ```npx react-native-asset```
160+
161+
This will automatically:
162+
- Copy the fonts into the iOS project.
163+
- Add the fonts to the Info.plist file.
164+
165+
3. Rebuild the project
140166

141167
## Custom Typography
142168

164 KB
Binary file not shown.
170 KB
Binary file not shown.
163 KB
Binary file not shown.
167 KB
Binary file not shown.
167 KB
Binary file not shown.
163 KB
Binary file not shown.
169 KB
Binary file not shown.
165 KB
Binary file not shown.
169 KB
Binary file not shown.

0 commit comments

Comments
 (0)