Custom font not loading


#1

I downloaded a font from dafont.com, and I am trying to use in my ionic project,

in ‘style.css’

i’ve added : @font-face {
font-family: Digital;
src : url(‘digital_italic.ttf’);
}

then used it as

h1 {
font-family: ‘Digital’;
}

but this isn’t working at all

Please help :smile:


#2

Solved, realised I had to put the font in the lib/font folder and then I added
font-family: “Digital”;
src: url("…/fonts/digital_italic.ttf");


#3

To resolve this issue, put fonts in lib/fonts folder, not just in folder of css.

Then use:

src: url("..lib/ionic/fonts/fontfile.eot");