Search code examples
angulartypescriptionic2ionic3google-font-api

How to change the font on ionic globally


I am using ionic version 3.9.2

What i want to achieve is i want to change all default font of the ionic app to my given custom font.

After googling a bit i got to understand that i have to set the font face thing in the app.scss which is present in the folder app

This was the code i used:

@import url('https://fonts.googleapis.com/css?family=Raleway');
$font-family-base: "Raleway", sans-serif !default;

However even after doing so i couldn't change the font of the whole app as it is not reflecting in the app.


Solution

  • Add all the Necessary fonts and links in the head part and just apply the styles to the following part of index.html file placed in src folder in an ionic 3 project

     <ion-app style="Whatever rules you want !font-family:family;"></ion-app>