woff

How do I use .woff fonts for my website?

房东的猫 提交于 2019-11-28 15:27:11
Where do you place fonts so that CSS can access them? I am using non-standard fonts for the browser in a .woff file. Let's say its 'awesome-font' stored in a file 'awesome-font.woff'. After generation of woff files, you have to define font-family, which can be used later in all your css styles. Below is the code to define font families (for normal, bold, bold-italic, italic) typefaces. It is assumed, that there are 4 *.woff files (for mentioned typefaces), placed in fonts subdirectory. In CSS code: @font-face { font-family: "myfont"; src: url("fonts/awesome-font.woff") format('woff'); } @font

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

那年仲夏 提交于 2019-11-28 02:38:00
问题 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

How do I use .woff fonts for my website?

帅比萌擦擦* 提交于 2019-11-27 09:13:28
问题 Where do you place fonts so that CSS can access them? I am using non-standard fonts for the browser in a .woff file. Let's say its 'awesome-font' stored in a file 'awesome-font.woff'. 回答1: After generation of woff files, you have to define font-family, which can be used later in all your css styles. Below is the code to define font families (for normal, bold, bold-italic, italic) typefaces. It is assumed, that there are 4 *.woff files (for mentioned typefaces), placed in fonts subdirectory.

Correct Apache AddType directives for font MIME types

江枫思渺然 提交于 2019-11-27 03:30:33
I’m using @font-face for embedded fonts (thanks Paul Irish ). In trying to fix Chrome’s warning about wrong MIME type for woff fonts, I’ve discovered a mass of conflicting suggestions. Everyone seems to agree that .eot fonts (for IE 6-8?) should be served using AddType application/vnd.ms-fontobject .eot For .ttf fonts (older non-IE browsers?) I’ve seen AddType application/x-font-ttf .ttf AddType application/octet-stream .ttf AddType font/truetype .ttf AddType font/ttf .ttf And for .woff fonts (the new standard?) I’ve seen AddType application/font-wof .woff AddType application/x-font-woff .woff

Correct Apache AddType directives for font MIME types

瘦欲@ 提交于 2019-11-26 10:31:21
问题 I’m using @font-face for embedded fonts (thanks Paul Irish). In trying to fix Chrome’s warning about wrong MIME type for woff fonts, I’ve discovered a mass of conflicting suggestions. Everyone seems to agree that .eot fonts (for IE 6-8?) should be served using AddType application/vnd.ms-fontobject .eot For .ttf fonts (older non-IE browsers?) I’ve seen AddType application/x-font-ttf .ttf AddType application/octet-stream .ttf AddType font/truetype .ttf AddType font/ttf .ttf And for .woff fonts

Proper MIME type for .woff2 fonts

泄露秘密 提交于 2019-11-26 06:05:12
问题 Today I updated Font Awesome package to 4.3.0 and noticed that woff2 font was added. That file is linked in CSS so I need to configure nginx to serve woff2 files properly. Currently I have this block in nginx config for fonts: location ~* \\.(otf|eot|woff|ttf)$ { types {font/opentype otf;} types {application/vnd.ms-fontobject eot;} types {font/truetype ttf;} types {application/font-woff woff;} } What is proper mime type for woff2 fonts? 回答1: In IIS you can declare the mime type for WOFF2 font

Why is @font-face throwing a 404 error on woff files?

我与影子孤独终老i 提交于 2019-11-26 02:15:35
问题 I\'m using @font-face on my company\'s site and it works/looks great. Except Firefox and Chrome will throw a 404 error on the .woff file. IE does not throw the error. I have the fonts located at the root but I\'ve tried with the fonts in the css folder and even giving the entire url for the font. If remove those fonts from my css file I don\'t get a 404 so I know it\'s not a syntax error. Also, I used fontsquirrels tool to create the @font-face fonts and code: @font-face { font-family: \

Mime type for WOFF fonts?

岁酱吖の 提交于 2019-11-26 01:55:33
问题 What mime type should WOFF fonts be served as? I am serving truetype (ttf) fonts as font/truetype and opentype (otf) as font/opentype , but I cannot find the correct format for WOFF fonts. I have tried font/woff , font/webopen , and font/webopentype , but Chrome still complains: \"Resource interpreted as font but transferred with MIME type application/octet-stream.\" Anybody know? 回答1: Update from Keith Shaw's comment on Jun 22, 2017: As of February 2017, RFC8081 is the proposed standard. It

Are eot, ttf, and svg still necessary in the font-face declaration?

萝らか妹 提交于 2019-11-26 00:43:57
问题 Up until now, I\'ve used Paul Irish\'s bulletproof font-face syntax But I was just looking at support for .woff and .woff2 files on caniuse and it says woff is supported in IE9+. Most articles on this topic are from around 2009, which at the time of this writing was a full 7 years ago. Do we really need to keep declaring ttf, otf, eot, and svg when woff now enjoys such wide support? 回答1: October 2018 edit tl;dr: only use WOFF2, every still-supported browser supports it, the end. Original