woff

Combine multiple .woff files into one

独自空忆成欢 提交于 2019-12-04 05:07:31
On a website I manage we have several .woff files, one for each font. In the interest to save loading time I want to reduce the number of requests made. Is it possible to combine these woff files into one resource? You can bundle the woff assets into your CSS with base64. Inside your @font-face declaration: url('data:application/x-font-woff;base64,myVeryLongBase64StringGoesHere...'); This may increase the asset's file size. In my experience this is usually by around 20% - roughly the same size as the equivalent TTF file. Much of this may be recovered with a gzip-capable server. The tradeoff is

MIME Types for woff, ttf, svg, and eot 404ing despite being setup in IIS

一个人想着一个人 提交于 2019-12-03 05:47:05
问题 I am trying to get a font to render within a file and it is giving me the usual error of Resource interpreted as Font but transferred with MIME type text/html: But the HTML file on show is our 404.aspx file, I tried the usual of installing the applications in the web.config and then eventually into IIS itself as: .woff application/font-woff .ttf application/font-ttf .eot application/vnd.ms-fontobject .otf application/font-otf .svg image/svg+xml I cannot understand where I am going wrong. the

MIME Types for woff, ttf, svg, and eot 404ing despite being setup in IIS

馋奶兔 提交于 2019-12-02 18:15:32
I am trying to get a font to render within a file and it is giving me the usual error of Resource interpreted as Font but transferred with MIME type text/html: But the HTML file on show is our 404.aspx file, I tried the usual of installing the applications in the web.config and then eventually into IIS itself as: .woff application/font-woff .ttf application/font-ttf .eot application/vnd.ms-fontobject .otf application/font-otf .svg image/svg+xml I cannot understand where I am going wrong. the files are stored in a folder called fonts that is in the base directory for the site and I have the

WOFF Fonts, what Are they and why should I care?

不问归期 提交于 2019-12-01 15:26:42
问题 So mozilla has proposed a new webfont, i'm not really into that world, but i want to keep myself up2date. So whats the great thing since even Microsoft is backing it, why should I as a webdev care? Whats the difference from the old ones? Do we need another font system? In what situations should i use WOFF? Why not just stick to the existing ones? Also a new tag called WOFF might be useful. 回答1: Well, WOFF is a new font standard, as you know (like truetype & opentype) but which is designed

Detecting with Javascript whether a Browser supports Web Open Font Format (Woff) or not

≯℡__Kan透↙ 提交于 2019-12-01 05:34:05
i have to detect with JS (jQuery) wether a browser supports Woff and then add a class to the body. Something like this: if(woffIsSupported){ $('body').addClass('modern'); } is this somehow possible? Thank you for your answers. Clive There's a function on this post called isFontFaceSupported that checks for support based on browser features (the good way, i.e. not relying on the user agent string). Copy that function and your code can become: if(isFontFaceSupported()) { $('body').addClass('modern'); } Here is the function from the post: /*! * isFontFaceSupported - v0.9 - 12/19/2009 * http:/

Detecting with Javascript whether a Browser supports Web Open Font Format (Woff) or not

跟風遠走 提交于 2019-12-01 04:44:14
问题 i have to detect with JS (jQuery) wether a browser supports Woff and then add a class to the body. Something like this: if(woffIsSupported){ $('body').addClass('modern'); } is this somehow possible? Thank you for your answers. 回答1: There's a function on this post called isFontFaceSupported that checks for support based on browser features (the good way, i.e. not relying on the user agent string). Copy that function and your code can become: if(isFontFaceSupported()) { $('body').addClass(

How to use a data uri with @font-face in Firefox

こ雲淡風輕ζ 提交于 2019-11-30 22:13:31
I am designing a splash page for a public wifi access point and Firefox refuse to display my custom font, while it work in every other browser (well, not IE < 9 but that was expected). The page need to work in the following constraint : No access to the Internet : This page is displayed before the user accept the term and condition, so everything is blocked The page is stored on the access point : That mean an embedded server probably written in C, and I can't really add additional header or something. Well its open source so it may be possible, but I am most certainly not an embedded

How to use a data uri with @font-face in Firefox

时光怂恿深爱的人放手 提交于 2019-11-30 17:55:02
问题 I am designing a splash page for a public wifi access point and Firefox refuse to display my custom font, while it work in every other browser (well, not IE < 9 but that was expected). The page need to work in the following constraint : No access to the Internet : This page is displayed before the user accept the term and condition, so everything is blocked The page is stored on the access point : That mean an embedded server probably written in C, and I can't really add additional header or

How can I only use Latin subset with Google Fonts WOFF2 files?

落爺英雄遲暮 提交于 2019-11-29 09:13:51
I wanted to add a font with Google Fonts, and I have noticed an odd behavior. I want to add a font with only the latin subset, I do not want latin-ext, cyrillic or cyrillic-ext subset, in order to lighten the code. I understand that's the default behavior, so I've done like this: <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Philosopher"> In Firefox (and the other browsers that do not support WOFF2), I get a correct output: @font-face { font-family: 'Philosopher'; font-style: normal; font-weight: 400; src: local('Philosopher'), url(http://fonts.gstatic.com/s/philosopher

How to convert WOFF to TTF/OTF via command line?

我的梦境 提交于 2019-11-28 15:38:50
问题 I know about services like Online Font Converter, but I am interested in offline solution, preferably over command line. Does anyone know a tool or workflow how to convert WOFF to OTF/TTF offline? 回答1: I wrote a simple tool for that: https://github.com/hanikesn/woff2otf Currently only tested with ttf files. 回答2: Here is the reference code for making WOFF files: http://people.mozilla.org/~jkew/woff/ I have a mirror: https://github.com/samboy/WOFF To compile and install, make sure you have the