Using custom font without losing the icons?


#1

To get a custom font in the whole app I used:

* {
  font-family: $font;
}

But then when I started using ionic’s icon’s of course their font-family changed too. So here’s my problem. I want to use a different font-family all over the app except for the icons. I can’t find the default font-family that is needed for the icons. When I inspect it it just says ‘Times’ but resetting it to that won’t make the icons work.


#2

Have you try specifying your font in variables.scss? I, for example, use Lato:

$font-family-md-base: "Lato";
$font-family-ios-base: "Lato";
$font-family-wp-base: "Lato";

P.S.: A post about how to include google font, if needed: Custom Fonts in Ionic3


#3

Ow that works thanks. I had only used: $font-family-base.
Your solution fixed it :smiley: