font-face

What's the correct order to load fonts in?

早过忘川 提交于 2019-12-23 11:57:07
问题 Paul Irish suggests that the 'bullet proof' way to load fonts is to render EOT first, followed by WOFF , TTF , and lastly SVG . @font-face { font-family: 'Tagesschrift'; src: url('tagesschrift.eot'); /* IE 5-8 */ src: local('☺'), /* sneakily trick IE */ url('tagesschrift.woff') format('woff'), /* FF 3.6, Chrome 5, IE9 */ url('tagesschrift.ttf') format('truetype'), /* Opera, Safari */ url('tagesschrift.svg#font') format('svg'); /* iOS */ } Source: http://www.html5rocks.com/en/tutorials

What's the correct order to load fonts in?

非 Y 不嫁゛ 提交于 2019-12-23 11:56:16
问题 Paul Irish suggests that the 'bullet proof' way to load fonts is to render EOT first, followed by WOFF , TTF , and lastly SVG . @font-face { font-family: 'Tagesschrift'; src: url('tagesschrift.eot'); /* IE 5-8 */ src: local('☺'), /* sneakily trick IE */ url('tagesschrift.woff') format('woff'), /* FF 3.6, Chrome 5, IE9 */ url('tagesschrift.ttf') format('truetype'), /* Opera, Safari */ url('tagesschrift.svg#font') format('svg'); /* iOS */ } Source: http://www.html5rocks.com/en/tutorials

How to add CORS (cross origin policy) to all domains in NGINX?

眉间皱痕 提交于 2019-12-23 10:56:28
问题 I have created a folder that will be used for serving static files (CSS, images, fonts and JS etc) I will eventually CNAME the folder into a subdomain for usage on a CDN to work with my Magento 2 setup. I want to allow ALL domains ALL access via CORS - Cross Origin Policy and I want to cache the data too. This is what I have. (I am not asking for security suggestions or tips on JSONP issues - I want global access to the file directory please) location /cdn-directory/ { location ~* \.(ico|jpg

CSS custom font vertical offset (bug?)

时间秒杀一切 提交于 2019-12-23 10:14:53
问题 I use custom font in my CSS with this method: @font-face { font-family: 'Gabriola'; src: url('Gabriola.eot'); src: url('Gabriola.eot?#iefix') format('embedded-opentype'), url('Gabriola.woff') format('woff'), url('Gabriola.ttf') format('truetype'); font-weight: normal; font-style: normal; } .gabriola { font-size: 20px; line-height: 20px; height: 20px; background: red; } <div class="gabriola">Some texty text here</div> Each browser renders this fonts by it's own way with vertical offset top and

Display Issues with Roboto Font from Materialize in Firefox

那年仲夏 提交于 2019-12-23 08:51:18
问题 I am using Materialize to style some of my web pages. I have noticed that Roboto font does not render correctly in Firefox (v43.0.3), but looks fine in Chrome. Both browsers are downloading the woff2 font file from my server, which this question seems to indicate should be the optimum choice for modern browsers. Chrome rendering: Firefox rendering: (I realize these low-res screencaps are not the best reproduction, the differences are much more apparent in the actual browsers.) In the Firefox

Flash of unstyled content in IE with @font-face

独自空忆成欢 提交于 2019-12-23 08:49:18
问题 I'm working on a site which uses the Open Sans typeface for the body text, with EOT, SVG, WOFF and TTF font files and stylesheet generated by Font Squirrel. I've included my fonts CSS first in my page header. But when I view the site in IE7, IE8 and even IE9 I get a flash of everything in Times Roman before the Open Sans kicks in. This isn't happening in the other browsers. Can anyone suggest a way I could stop this happening? Here's the Font Squirrel CSS I'm using for that font: @font-face {

@Font-face and wrong value of the offsetWidth attribute

一曲冷凌霜 提交于 2019-12-23 07:57:48
问题 I encounter this problem in the latest version of Chromium. After the creation of the first element using a font-family embedded via @font-face I am being handed wrong offsetXyz values. By the time the script is executed, the window.onload hook will already have fired and the font will thus have already been loaded. This is what the script looks like (schematically): var e = document.createElement("span"); e["innerText" in e?"innerText":"textContent"] = "fooBar"; e.style.fontFamily =

@font-face not loading font

别等时光非礼了梦想. 提交于 2019-12-23 07:15:28
问题 I am trying to use @font-face and for some reason it is failing to work (IE9, Chrome and Firefox). I have made sure that I am pointing to the correct directory when loading the font however it still doesn't seem to work. Here is my code: @font-face{ font-family: 'test'; src: url('../fonts/FontName.ttf'), url('../fonts/FontName.eot'); font-weight: normal; font-style: normal; } And calling it: #header{ text-align:left; padding: 10px; font-family:test; } What am i doing wrong? 回答1: Internet

@font-face not loading font

…衆ロ難τιáo~ 提交于 2019-12-23 07:15:17
问题 I am trying to use @font-face and for some reason it is failing to work (IE9, Chrome and Firefox). I have made sure that I am pointing to the correct directory when loading the font however it still doesn't seem to work. Here is my code: @font-face{ font-family: 'test'; src: url('../fonts/FontName.ttf'), url('../fonts/FontName.eot'); font-weight: normal; font-style: normal; } And calling it: #header{ text-align:left; padding: 10px; font-family:test; } What am i doing wrong? 回答1: Internet

@font-face does not work in IE on initial page load, but does after that

别说谁变了你拦得住时间么 提交于 2019-12-23 05:38:07
问题 We have a problem whereby we successfully implemented @font-face for IE6-9 as normal, and in fact on the client site in question it all worked fine. Then we copied the skin over to two new sites for client (testing and production) whereby the font replacement still worked as expected. Over night these sites had SSL certs applied. The following morning it appeared that font replacement was no longer working much to our annoyance. Throughout this period of 'discovery' and 'anguish' @font-face