Referencing a font file

Hi everyone,

I’m trying to reference some font files in my code. According to Bootstrap, icon font files need to be located in the …/fonts/ directory, relative to the compiled css files. I have a directory called css in my root folder that contains my compiled css file. I also have a directory called fonts in my root directory where I’m storing the bootstrap icon font. I’m referencing the font file in my css file using the following code:

@font-face {
font-family: myfont;
src: url(…/fonts/myfont.eot);
src: url(…/fonts/myfont.eot?#iefix) format(‘embedded-opentype’), url(…/fonts/myfont.woff2) format(‘woff2’), url(…/fonts/myfont.woff) format(‘woff’), url(…/fonts/myfont.ttf) format(‘truetype’);
}

But the above doesn’t seem to render the font.

Can anyone tell me what I might be doing wrong or if I’ve got the path incorrect?

Thanks so much in advance.

Just an update on this: it seems to be rendering correctly on the remote side but just not on my local machine so not sure why.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.