2
When re-loading a page the icons of a Webfont are loaded only after loading the CSS and this causes a "little dance" in the text.
See below for the unwanted behavior of the icon when re-loading the page:
The source code of my CSS:
@font-face {
font-family:"icons";
src:url("../fonts/icons.eot");
src:url("../fonts/icons.eot?#iefix") format("embedded-opentype"),
url("../fonts/icons.woff") format("woff"),
url("../fonts/icons.ttf") format("truetype");
font-weight:normal;
font-style:normal;
}
.i {
font-family:"icons";
display:inline-block;
vertical-align:middle;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
.i--menu:before {
content:"\f117";
}
This problem is called
flicker
normally. Paul Irish did a post on the subject:Fighting the @font-face FOUT
Take a look also at the following material:Introduction to the Google WebFont Loader
– Romulo
Bruno, what is the font you are loading in this example?
– Romulo
@Romulo is a custom using Grunt-Webfont.
– Bruno Wego