CSS3 @font-face loading

Forums » Dev.Opera » General Web Development Discussions

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

29. March 2012, 07:06:52

remifr

Posts: 2

CSS3 @font-face loading

Hello,

I'm using @font-face to display custom fonts on a website I'm working on.
It works fine with every browser but in Opera, it loads the default font and then changes it to the custom font almost instantaneously.
The problem is "almost", because every time I change page with the menu, it loads the default font and changes it again. That's not very pretty.
It's not a problem for my boss because few use Opera. But it is for me because it's my default browser and I wanna be proud of my work.
So ... is there something I can do to avoid the loading of the default font first ?

My code is :
@font-face {
    font-family: "NegotiateFree";
    src: url("../fonts/negotiate_free-webfont.eot");
    src: url("../fonts/negotiate_free-webfont.eot?#iefix") format("embedded-opentype"),
         url("../fonts/negotiate_free-webfont.woff") format("woff"),
         url("../fonts/negotiate_free-webfont.ttf") format("truetype"),
         url("../fonts/negotiate_free-webfont.svg#NegotiateFree") format("svg");
    font-weight: normal;
    font-style: normal;
}

h1
{
	font-family: "NegotiateFree", arial, sans-serif;
}


Thank you and sorry for my bad english.
Rémi

29. March 2012, 09:15:25

Frenzie

Posts: 14422

I'm not exactly sure about what you mean by change page with the menu, but I definitely prefer Opera's method of displaying the text in a fallback font while loading to Chrome's method of not displaying anything at all for what can seem like forever. I'd think that by default you shouldn't notice the text being replaced anyway while going back & forward, only if you've enabled instant redraw?
Intelligent alien life does exist, otherwise they would've contacted us. — CalendarExtend Opera

29. March 2012, 09:26:44

remifr

Posts: 2

You're right, while going back and forward it's ok.
The problem is when I go to an other page (using a link in my menu). But it's not very important and I think there is no way to change that.
Thank you anyway smile

Forums » Dev.Opera » General Web Development Discussions