#font-face Font doesn't render in IE - html

I have some fonts that are used throughout my site and in IE the font doesn't render correctly (at all). I've done some researching around and it appears I need to set it to installable embedding allowed. I've tried using http://carnage-melon.tom7.org/embed/ but when I download the embed.exe the terminal doesn't appear. This is only an Issue in IE works fine in chrome, opera, safari and firefox.
IE Console Log:
CSS3114: #font-face failed OpenType embedding permission check. Permission must be Installable.
CSS
#font-face {
font-family: 'droid-sans-regular';
src: url('../fonts/DroidSans-webfont.woff') format('woff'),
url('../fonts/DroidSans-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

you need the eot font type for ie:
src: url('../fonts/DroidSans-webfont.eot'); /* IE9 and above */
src: url('../fonts/DroidSans-webfont.eot?#iefix') format('embedded-opentype'), /* IE8 */

Related

Custom Font not working on Firefox and IE. Chrome Fine

Recently I used a custom font on my websites. After uploading it to a server, I was only able to view the font in Google Chrome. In Firefox and IE, the font switched back to Times New Romans. However, after uploading it to another server, both FF and Chrome can view it but IE still can't. Is there any way to ensure that all browsers can use the font?
Make sure your #font-face rule like below
#font-face {
font-family: "Calibri";
src: url('fonts/calibri_2.eot');
src: url('fonts/calibri_2.eot?#iefix') format('embedded-opentype'),
url('fonts/calibri_2.svg#Calibri') format('svg'),
url('fonts/calibri_2.woff') format('woff'),
url('fonts/calibri_2.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

Using fonts with Wordpress in different Browsers

So I've read that there is a bug on Chrome for Windows which cause bad rendering. Is this the same for Opera? And why isn't it working for IE?
Font: http://www.google.com/fonts#UsePlace:use/Collection:Libre+Baskerville
Embedding:
wp_enqueue_style('fontbask', 'http://fonts.googleapis.com/css?family=Libre+Baskerville:400,500,700,400italic&subset=latin,latin-ext');
CSS I've tried
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-stroke: 1px transparent;
Result:
Brwoser versions:
Opera 19.0.1326.63
Chrome 32.0.1700.107 m
Internet Explorer 11.0.9600.16518
Firefox 26.0
I also tried to use font-face to include the fonts, which had exactly the same result.
#font-face {
font-family: 'LibreBaskerville';
src: url('fonts/LibreBaskerville-Regular.otf') format('truetype');
font-weight: normal;
font-style: normal;
}
I downloaded the fonts # http://www.fontsquirrel.com/fonts/libre-baskerville?q[term]=baskerville&q[search_check]=Y
In this screenshot it doesn't look that bad, but you can see live here: http://www.citizen-science.at/wordpress/
I also found that the font from http://www.google.com/fonts#UsePlace:use/Collection:Libre+Baskerville is rendered as badly as well. So it seems it is a browser issues.
When I'm using my local fonts instead of Google fonts, IE is able to show it, but Opera and Chrome still don't
Opera have issue in font rendering. this will help you finding the solution. If Google fonts are not must use for you then i recommend this website for web font generation. This works awesomely with cross browser compatibility.
#font-face {
font-family: 'libre_baskervilleregular';
src: url('librebaskerville-webfont.eot');
src: url('librebaskerville-webfont.eot?#iefix') format('embedded-opentype'),
url('librebaskerville-webfont.woff') format('woff'),
url('librebaskerville-webfont.ttf') format('truetype'),
url('librebaskerville-webfont.svg#libre_baskervilleregular') format('svg');
font-weight: normal;
font-style: normal;
}
Web fonts generated from fontsquirrel. Use this, these will work with cross browser compatibility including Opera.
good luck!

css font family not appearing?

I've ran into an issue with font-family; basically I'm doing all the right things (I hope) yet for some reason the font is doing some weird things. So let me explain the issue..
On my browser the font appears OK in chrome/IE yet it doesn't appear in mozilla.
On my dad's laptop, the font doesn't appear what-so-ever in any browser.
On my mates apple mac, the font appears in Safari but not in chrome.
On iPhone the font appears.
On Nexus 4 the font doesn't appear (in Chrome or Mozilla)
This is why I'm confused; Why is it appearing in some browsers on different platforms and not on the others? Can a font be specific to an OS?
Here's the CSS i'm using.
#font-face {
font-family: "Pixelated";
src: url('templates/joostrap/fonts/pixelated.ttf');
}
This is how i'm applying it.
{font-family: "Pixelated"; text-transform: uppercase;}
Any help would be appreciated! cheers!
The most common problem with fonts not showing up is that the path was not properly specified. This happens more when you have multiple file fonts such as: light, bold, medium. So perhaps your path is
src: url('templates/joostrap/fonts/pixelated.ttf');
But if multiple versions are in one directory, it could be
src: url('templates/joostrap/fonts/pixelated/pixelated.ttf');
This happened to me before. In my case I had the fonts.css in my CSS directory, then i had the fonts in assets and the variations of the fonts were in the same directory. In my case I had to implement the Across the Road font. So based on my directory structure I did
#font-face {
font-family: 'across_the_roadregular';
src: url('../assets/fonts/across_the_road/across_the_road-webfont.eot');
src: url('../assets/fonts/across_the_road/across_the_road-webfont.eot?#iefix') format('embedded-opentype'),
url('../assets/fonts/across_the_road/across_the_road-webfont.woff2') format('woff2'),
url('../assets/fonts/across_the_road/across_the_road-webfont.woff') format('woff'),
url('../assets/fonts/across_the_road/across_the_road-webfont.ttf') format('truetype'),
url('../assets/fonts/across_the_road/across_the_road-webfont.svg#across_the_roadregular') format('svg');
font-weight: normal;
font-style: normal;
}
Notice that I specified various file types. This is because not all browsers can display the .ttf format. You can see compatability at http://caniuse.com/#feat=ttf
TTF fonts must be used differently when using in Chrome and Firefox. Check this link to setup the TTF correctly:
ttf files not rendering on Chrome and Firefox
The problem is that you're only using a .ttf file. Not every browser will be able to load it.
Instead you should use a generator (link) so you have a .eot and a .woff file aswell.
Your font CSS will look like this:
#font-face {
font-family: 'Pixelated';
src: url('../fonts/pixelated.eot');
src: url('../fonts/pixelated.eot?#iefix') format('embedded-opentype'),
url('../fonts/pixelated.woff') format('woff'),
url('../fonts/pixelated.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Hope this helped.
Specify a font named "myFirstFont", and specify the URL where it can be found
#font-face
{
font-family: myFirstFont;
src: url('Sansation_Light.ttf'),
url('Sansation_Light.eot'); /* IE9 */
}
Include a font file somewhere on your server, and refer to it with CSS
src: url('Sansation_Light.ttf')
If the font file is located at a different domain, use a full URL instead
src: url('http://www.w3schools.com/css3/Sansation_Light.ttf')
I think this link helps you http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp

#font-face url pointing to local file

I need to include a font (OpenSymbol) in a html file and the font file is in a local folder (I know the exact absolute path to it). If I use #font-face like this:
#font-face {
font-family: "OpenSymbol";
src: url("<absolutePath>/OpenSymbol.ttf") format("truetype");
}
It works in Chrome, Opera and Safari, but not in Firefox neither IE9. Other #font-face usage works perfectly fine in all browsers.
Btw, in Chrome, I get a warning:
Resource interpreted as Font but transferred with MIME type application/octet-stream
What can I do to cleanly include a locally stored font which is not installed on the OS?
Edit:
I found out that the listing of different urls seems not to work! Chrome loads the font if I put the [...].ttf url in the first place, but not if it's somewhere else!
2nd Edit:
I got it to work in all browsers except firefox:
#font-face {
font-family: 'OpenSymbol';
src: url('file:<path>/openSymbol.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'OpenSymbolEOT';
src: url('file:<path>/openSymbol.eot') format('embedded-opentype');
font-weight: normal;
font-style: normal;
}
...
and then
.element {
font-family: OpenType, OpenTypeEOT, [...];
}
Anyway, it does work in IE but not in eclipse, which uses IE's rendering engine... o.O
Btw, firefox has problems because of security issues: See here
You just need one font file in web open font format. Go to http://www.fontconverter.org to convert your OpenSymbol.tff to OpenSymbol.woff. I am a cross-platform developer and i tested this works okay on:
Safari 10.1 and Firefox 52.0.2 on macOS 10.12.4 (iMac)
Internet Explorer 11.0 and Firefox 52.0.1 and Google Chrome 52.0 and Opera 53.0 on Windows 7 (PC)
Safari on iOS 10.3.1 (iPhone)
Chrome 57.0 and Asus Browser 2.0.3 on Android 5.0.2 (Asus tablet)
This goes in the css:
/* Add the decaration on top */
#font-face {
font-family: 'OpenSymbol';
src: url('font/OpenSymbol.woff') format('woff');
}
/* in separate css .elements or even the whole body, edit your font properties */
body {
font-family: OpenSymbol;
font-weight: normal;
font-style: normal;
..
No need to bother with Embedded OpenType (EOT) fontfiles, because they are only needed for IE9 (2011) and IE10 (2012).
No need to bother with Scalable Vector Graphics (SVG) fonts, because they're no longer needed since iOS 5.0
Already since 2012 Web Open Font Format (WOFF) is fully supported by every known browser. Truetype Fonts (TTF) are used local on iMac and PC, and can be used local on Android and iPhone as well. That's why web developers often make this mistake, using TTF instead of WOFF for a site.
It might be the browser is just not supporting the .ttf file. Consider working with fontsquirrel, it will generate all required files (.ttf, .woff, .svg, .eot) and css for you, and works in all browsers. I use it all the time...
According to a sample font page from Font Squirrel, Both IE 9 and Firefox require font files to be served from the same domain as the page they are loaded into. So with #font-face, your only option is to find the font file(s) you are trying to use and upload them to the site, and then use code similar to the following:
#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 */
}
Taken from http://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax
EDIT: One more thing from the Font Squirrel page, if you are using an IIS server, the file types need to be add to the list of MIME types.

IE Problem with True Type Font

I intalled a new font on my website but I cannot get IE8 and IE9 to recognize, I have no knoledge on how the browsers render the fonts, but my css style sheet font declaration is as follows,
#font-face {
font-family: VAGRounded; src: url("../fonts/VAGRoundedW01-Light.eot") /* EOT file for IE */
src:url("../fonts/VAGRoundedW01-Light.eot?#iefix") format('embedded-opentype');
}
#font-face { font-family: VAGRounded; src: url("../fonts/VAGRoundedW01-Light.TTF") format('truetype'),
url("../fonts/VAGRoundedW01-Light.svg#webfontmvIrHXJB") format('svg');
Much help is appreciated!!
IE8 and IE9 do not support embedded fonts via the CSS3 scheme without first converting into supported formats (SVG, TT, EOT, etc.). EDIT: IE8 and IE9 requires tweaks to support embedded fonts. See the comments on your question since it's a duplicate.
FYI IE10 will be the first IE browser to support the HTML5 standard.
There are nifty other methods of embedding fonts. The one I recommend is Cufon because it uses VML in older browsers and doesn't require flash.
http://cufon.shoqolate.com/generate/
You should consider using a service like Font Squirrel.
It generates all the code for the various browsers.
Output would look something like this
#font-face {
font-family: 'LivingstoneRegular';
src: url('../livingst-webfont.eot');
src: url('../livingst-webfont.eot?iefix') format('eot'),
url('../livingst-webfont.woff') format('woff'),
url('../livingst-webfont.ttf') format('truetype'),
url('../livingst-webfont.svg#webfont44PDl6Sr') format('svg');
font-weight: normal;
font-style: normal;
}
http://www.fontsquirrel.com/fontface/generator
Try a proper syntax: Fontspring Syntax, Further Hardening of the Bulletproof Syntax, Mo’ Bulletproofer, or Smiley.