Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using font-face in meteor?

I am trying to use CSS @font-face in meteor, but for some reason it isn't working:

@font-face {
    font-family: printFailed; 
    src:
    url("../public/fonts/wlm_print_failed.ttf"),
    url("../public/fonts/wlm_print_failed.eot");
}

I've checked my paths and spelling.

When I inspect the element in the browser it appears that the filepaths and names are correct, but that the browser is substituting a generic font instead of the intended custom font.

Any pointers? Thanks.

like image 917
songololo Avatar asked Jun 08 '13 04:06

songololo


1 Answers

Just use / as everything in public becomes the root directory from the point of view of the web browser:

@font-face {
    font-family: printFailed; 
    src:
    url("/fonts/wlm_print_failed.ttf"),
    url("/fonts/wlm_print_failed.eot");
}
like image 190
Tarang Avatar answered Oct 12 '22 13:10

Tarang