Custom fonts not loading on iOS

  1. SDK Version: 34
  2. Platforms(Android/iOS/web/all): iOS

Hi,

I’m trying to publish a iOS version and have serveral layout issues to fix, but can’t really figure out why fonts are not being loaded by iOS.

I’m using Montserrat and Montserrat Bold from Google Fonts. But they should be compiled pretty well i guess?

https://fonts.google.com/specimen/Montserrat?selection.family=Montserrat:400,700

I’m using code like this in my App.js file:

async function loadResourcesAsync() {
	await Promise.all([
		Asset.loadAsync([
			require('./assets/images/splash.png'),
			require('./assets/images/icon.png'),
		]),
		Font.loadAsync({
			...Ionicons.font,
			'montserrat-regular': require('./assets/fonts/Montserrat-Regular.ttf'),
			'montserrat-bold': require('./assets/fonts/Montserrat-Bold.ttf'),
		}),
	]);
}

Best,
Andy

Hey @caminoninja,

Is this occurring on a physical device or a simulator? Also, are your image assets loading properly?

Cheers,
Adam

It is on a physical device via TestFlight. Images are loading fine. Just the font showing default system font.

Best,
Andy

Ok, got it solved …i used a regular font and set the fontWeight to bold …didn’t work on Android either but didn’t notice the difference. Solution was to use the bold font and not setting the fontWeight property.

Thank you for your help @adamjnav

Best,
Andy

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.