Ionic cli 3.9.2 deletes ionic fonts

Since I have ipgraded the ionic cli to version 3.9.2, I’m getting this error when deploying to android: Failed to load resource: net::ERR_FILE_NOT_FOUND roboto-regular.woff2, took a look at assets/fonts folder and there is only 2 files: ionicons.woff and ionicons.woff2, all the other fonts are gone. I downgraded to 3.9.0 and the issue was fixed

4 Likes

Is this reproducible with a new project started with ionic start blank blank?
If so, please create an issue here: https://github.com/ionic-team/ionic-cli/issues

After upgrading to ionic cli 3.9.2 same error on IOS.

Solution: Move custom fonts (I use ttf format) from /assets/fonts to /assets folder and update paths in scss file:

@font-face {
font-family: RobotoCondensed;
src: url(“…/assets/RobotoCondensed-Regular.ttf”);
}

It works for me on IOS and Android as well.

3 Likes

This sounds related: https://github.com/ionic-team/ionic-cli/issues/2675

@moskwamichal, could you explain more:

1- which fonts folder? there are 4 assets folders with 4 fonts folder, first in src, second in www, third in platforms/android/assets/www and finally in platform/ios/www.

2- which css file? there are a multitude of css files.

In general you ignore anything under www and platforms.

You would update whatever scss file references your custom font.

@SigmundFroyd, that sounds a lot of work! it’s easier just to rollback to 3.9.1

same issue for me as well

(You should all +1 that Github issue and maybe even comment your details so the developers know this problem affects lots of people and can prioritize it accordingly)

2 Likes