When I add Google web fonts using the @import rule in my CSS file, it works fine.
But when I download this font and save it locally on my server, and then direct the @ font-face rule to my own machine, it does not work.
So, I made a replacement for this line in the css / fonts.css file:
@import url(http:
with this:
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; src: url(http://localhost/xampp/mysite/css/fonts/michroma/micrhoma.woff) format('woff'); }
In other words, I just copied the code from googleapi for this font. And I saved the font file (.woff) in the above path (I double-checked, it really is).
I tried to edit the url too, but nothing good:
src: url(fonts/michroma/michroma.woff) format('woff');
I cannot believe that there is any reason why Google web fonts will not work if we use them locally, so that something is wrong with what I am doing. The evidence? Isn't that the way we define our own font faces? (I have never tried this before).
user961627
source share