Hi viewers, In this article i will explain how to add a custom fonts in your ionic application.

Download your favourite font and place in assets folder of your project, if you have any doubt please find the path below.

project-folder/app/assets

For example: I am going to use my favourite font ‘Poppins’ which i get from google fonts.

project-folder/app/assets/fonts/PoppinsRegular.ttf

In your global.scss

@font-face {   
  font-family: 'Poppins';
  src: url('../assets/fonts/PoppinsRegular.ttf');
}

Now you can use the font inside any page of your application as i mentioned below.

.h1{
  font-family: 'Poppins';
}

Leave a Reply

Your email address will not be published. Required fields are marked *