I've added three fonts to my page with the #font-face css operative. Surfing to the page http://www.oefentherapie-fysiotherapie.nl/index.html shows the page, but does not load the fonts. Refreshing the page does not help. Browsing to another page does render the fonts, and returning to the original page with the back button makes the page render the font correctly.
The css for the page is:
#font-face {
font-family: 'Aller Regular';
src: url('Aller_Rg.eot'); /* IE9 Compat Modes */
src: url('Aller_Rg.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('Aller_Rg.woff2') format('woff2'), /* Super Modern Browsers */
url('Aller_Rg.woff') format('woff'), /* Pretty Modern Browsers */
url('Aller_Rg.ttf') format('truetype');
}
#font-face {
font-family: 'Aller Bold';
src: url('Aller_Bd.eot'); /* IE9 Compat Modes */
src: url('Aller_Bd.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('Aller_Bd.woff2') format('woff2'), /* Super Modern Browsers */
url('Aller_Bd.woff') format('woff'), /* Pretty Modern Browsers */
url('Aller_Bd.ttf') format('truetype');
font-weight: bold;
}
#font-face {
font-family: 'Turnpike';
src: url('/css/Turnpike.eot'); /* IE9 Compat Modes */
src: url('/css/Turnpike.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/css/Turnpike.woff2') format('woff2'), /* Super Modern Browsers */
url('/css/Turnpike.woff') format('woff'), /* Pretty Modern Browsers */
url('/css/Turnpike.ttf') format('truetype');
}
Are the fonts not rendering because the file is too large, so it is not completely read before the page is displayed?
Thanks in advance.
Related
I need to optimize my page at work (my first job as web dev) and i can't get rid of font-display error message at speed insights. I've googled, i've read docs, blogs, forums etc. and i think im expert in this topic now however still speed insights doesn't accept it. Why is that? Please send help :)
Problem seems to occur with fontawesome, not with regular fonts, i've dealt with those. I have fonts downloaded offline, im importing them, and importing stylesheet. Code below
#font-face {
font-family: 'fa-brands-400';
src: url('/fontawesome/webfonts/fa-brands-400.eot'); /* IE9 Compat Modes */
src: url('/fontawesome/webfonts/fa-brands-400.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/fontawesome/webfonts/fa-brands-400.woff') format('woff'), /* Modern Browsers */
url('/fontawesome/webfonts/fa-brands-400.ttf') format('truetype'), /* Safari, Android, iOS */
url('/fontawesome/webfonts/fa-brands-400.svg#svgFontName') format('svg'); /* Legacy iOS */
font-display: swap;
font-family: 'fa-regular-400';
src: url('/fontawesome/webfonts/fa-regular-400.eot'); /* IE9 Compat Modes */
src: url('/fontawesome/webfonts/fa-regular-400.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/fontawesome/webfonts/fa-regular-400.woff') format('woff'), /* Modern Browsers */
url('/fontawesome/webfonts/fa-regular-400.ttf') format('truetype'), /* Safari, Android, iOS */
url('/fontawesome/webfonts/fa-regular-400.svg#svgFontName') format('svg'); /* Legacy iOS */
font-display: swap;
font-family: 'fa-solid-900';
src: url('../fontawesome/webfonts/fa-solid-900.eot'); /* IE9 Compat Modes */
src: url('../fontawesome/webfonts/fa-solid-900.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fontawesome/webfonts/fa-solid-900.woff') format('woff'), /* Modern Browsers */
url('../fontawesome/webfonts/fa-solid-900.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fontawesome/webfonts/fa-solid-900.svg#svgFontName') format('svg'); /* Legacy iOS */
font-display: swap;
}
When I use this on my style tag the font works just fine with FireFox and Google Chrome And Edge :
#font-face {
font-family: 'AlArabiyaRegular';
src :url('template/fonts/ae_AlArabiya.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
but it's not working on IE so I seareched about it and it's looks like I have to use 'woff' and 'eot' in order to make it work with IE so I used this code :
#font-face {
font-family: 'AlArabiyaRegular';
src: url('template/fonts/ae_AlArabiya.eot');
src: url('template/fonts/ae_AlArabiya.woff') format('woff'),
url('template/fonts/ae_AlArabiya.tff') format('truetype'),
url('template/fonts/ae_AlArabiya.svg#webfontg8dbVmxj') format('svg');
}
but when I change my style to it's not working even on FireFox
Use all the css font family src posibilities:
#font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
If a .ttf works in other browsers but not IE, it's usually a sign that the font hasn't got the "installable bit" set. See this thread for more info and fixes.
I have the following CSS code:
<i class="mce-ico mce-i-alignright"></i>
After this are ::before pseudo:
.mce-i-alignright:before {
content: "\e005";
}
So, it is displaying incorrect, like as square everywhere. Look at picture
Make sure you have the require font loaded. the box is to indicate the character is not found.
#font-face {
font-family: myFirstFont;
src: url(font_name.woff);
}
i{
font-family: myFirstFont;
}
You need to specify the font those symbols require in order to display the characters correctly. You may or may not have a variety of different formats available from the font creator, you should include as many as you can in your page as follows:
#font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
i.mce-ico {
font-family: 'MyWebFont';
}
I'm using #font-face in my project for loading a specific webfont ("Amsi Pro"). The main problem is that it works on most of the computers I tested, but not on all (On those where it didn't work other websites with #font-face still worked).
Is there anything I've missed, or any server settings to set that will give me full support?
Some information of a PC where #font-face doesn't work:
whatsmybrowser.org/b/Q2TJ80F
Live Preview:
christlicher-gesundheitskongress.de
CSS:
#font-face {
font-family: 'AmsiPro';
font-weight: 400;
src: url('../webfonts/2E508B_0_0.eot');
src: url('../webfonts/2E508B_0_0.eot?#iefix') format('embedded-opentype'),
url('../webfonts/2E508B_0_0.woff2') format('woff2'),
url('../webfonts/2E508B_0_0.woff') format('woff'),
url('../webfonts/2E508B_0_0.ttf') format('truetype');
}
#font-face {
font-family: 'AmsiPro';
font-weight: 600;
src: url('../webfonts/2E508B_1_0.eot');
src: url('../webfonts/2E508B_1_0.eot?#iefix') format('embedded-opentype'),
url('../webfonts/2E508B_1_0.woff2') format('woff2'),
url('../webfonts/2E508B_1_0.woff') format('woff'),
url('../webfonts/2E508B_1_0.ttf') format('truetype');
}
html,body {
font-family: 'AmsiPro', Helvetica, sans-serif;
}
Even though it seems that Firefox 38 should support #font-face, there may be a partial use issue. Try using an app like Font-Squirrel to develop an SVG of your font and then reorder your #font-face like so:
#font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
Per this source, it should maximize the amount of support your font has.
Hope this helped!
I've tried many of the solutions found in other topics but still the font won't load in IE8.
The fonts are converted by FontSquirrel and also the CSS has been generated there. No alternation.
According to the other topics.. it should work now. But.. it does not. Is there any workaround to make it work? Or is it just one of those things i can keep hating ie8 about?
Problem can be seen on this URL: www.kokomogroningen.nl
Font-face is currently:
#font-face {
font-family: 'dincondregularregularcondRgRgularregularcondRgRgularregularcondRgRg';
src: url('/css/ff_din_condensed_regular-webfont.eot');
src: url('/css/ff_din_condensed_regular-webfont.eot?#iefix') format('embedded-opentype'),
url('/css/ff_din_condensed_regular-webfont.woff') format('woff'),
url('/css/ff_din_condensed_regular-webfont.ttf') format('truetype'),
url('/css/ff_din_condensed_regular-webfont.svg#dincondregularregularcondRgRgularregularcondRgRgularregularcondRgRg') format('svg');
font-weight: normal;
font-style: normal;
}
Source http://css-tricks.com/
#font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
This may also help
Font Face not working in IE8 as expected