“The Web Open Font Format (WOFF) is a font format for use in web pages. It was developed during 2009 and is now a World Wide Web Consortium (W3C) Recommendation. WOFF is essentially OpenType or TrueType with compression and additional metadata. The goal is to support font distribution from a server to a client over a network with bandwidth constraints.”
application/font-woff
Make sure that your server knows it.
In order to use WOFFs, use the CSS @font-face
directive. I will alllow:
Let's create a web page that includes a [font]
Life example: http://tecfa.unige.ch/guides/WOFF/woff-blisssym-example.html (tested oct. 2015 with FF, IE and Chrome under Win8 and Ubuntu).
<!DOCTYPE html>
<html>
<head>
<title>Simple WOFF example</title>
<meta charset="UTF-8"/>
<style type="text/css">
@font-face {
font-family: 'MyBliss';
src: url('BLISSYM.woff') format('woff'),
url('BLISSYM.woff2') format('woff2');
}
.blissy {font-family:MyBliss;color:blue;}
</style>
</head>
<body>
<p>
Text in one paragraph includes a <a href="http://edutechwiki.unige.ch/en/WOFF">WOFF</a> font. The Web Open Font Format (WOFF) is a font format for use in web pages is a World Wide Web Consortium (W3C) Recommendation.
</p>
<p>
Look at the source, Lucille. Below some <a href="http://edutechwiki.unige.ch/en/Pictographic_language">Bliss symbols</a>:
</p>
<hr>
<span class="blissy">
</span>
<hr>
</body>
</html>
It also is possible to use some kind of local inline styling, but as of Oct 15, this only worked under Chrome.
<div id="scoped-content">
<style type="text/css" scoped>
@font-face {font-family: 'MyBliss'; src:url('BLISSYM.woff') format('woff');url('BLISSYM.woff2') format('woff2');}
</style>
<span style="font-family:MyBliss;color:blue;">
</span>
<hr>
</div>
fonts: