Once you know things like kerning, or the difference between types of fonts, and how to pair fonts, you’ll be on your way to being a better designer. Read our guide on typography terms The 5 Most Important Typography Terms. TTF Fonts: Which Is Better? What’s the Difference? TTF Fonts: Which Is Better?
In CSS3
font-face
, there are multiple font types included like ttf
, eot
, woff
, svg
and cff
.Why should we use all of these types?
If they are special to different browsers, why is the number of them greater than the number of the major web browsers?
user16948user16948
3 Answers
Answer in 2019:
Only use WOFF2, or if you need legacy support, WOFF. Do not use any other format
(
svg
and eot
are dead formats, ttf
and otf
are full system fonts, and should not be used for web purposes)Original answer from 2012:
In short, font-face is very old, but only recently has been supported by more than IE.
eot
is needed for Internet Explorers that are older than IE9 - they invented the spec, but eot was a proprietary solution.ttf
andotf
are normal old fonts, so some people got annoyed that this meant anyone could download expensive-to-license fonts for free.- Time passes, SVG 1.1 adds a 'fonts' chapter that explains how to model a font purely using SVG markup, and people start to use it. More time passes and it turns out that they are absolutely terrible compared to just a normal font format, and SVG 2 wisely removes the entire chapter again.
- Then,
woff
gets invented by people with quite a bit of domain knowledge, which makes it possible to host fonts in a way that throws away bits that are critically important for system installation, but irrelevant for the web (making people worried about piracy happy) and allows for internal compression to better suit the needs of the web (making users and hosts happy). This becomes the preferred format. - 2019 edit A few years later,
woff2
gets drafted and accepted, which improves the compression, leading to even smaller files, along with the ability to load a single font 'in parts' so that a font that supports 20 scripts can be stored as 'chunks' on disk instead, with browsers automatically able to load the font 'in parts' as needed, rather than needing to transfer the entire font up front, further improving the typesetting experience.
If you don't want to support IE 8 and lower, and iOS 4 and lower, and android 4.3 or earlier, then you can just use WOFF (and WOFF2, a more highly compressed WOFF, for the newest browsers that support it.)
Support for
Support for
woff
can be checked at http://caniuse.com/woffSupport for
woff2
can be checked at http://caniuse.com/woff2![Otf Vs Ttf Otf Vs Ttf](/uploads/1/2/6/2/126266032/268682118.jpg)
Rich BradshawRich Bradshaw
Woff is a compressed (zipped) form of the TrueType - OpenType font. It is small and can be delivered over the network like a graphic file. Most importantly, this way the font is preserved completely including rendering rule tables that very few people care about because they use only Latin script.
Take a look at [dead URL removed]. The font you see is an experimental web delivered smartfont (woff) that has thousands of combined characters making complex shapes. The underlying text is simple Latin code of romanized Singhala. (Copy and paste to Notepad and see).
Only woff can do this because nobody has this font and yet it is seen anywhere (Mac, Win, Linux and even on smartphones by all browsers except by IE. IE does not have full support for Open Types).
user2422970user2422970
WOFF 2.0, based on the Brotli compression algorithm and other improvements over WOFF 1.0 giving more than 30 % reduction in file size, is supported in Chrome, Opera, and Firefox.
http://sth.name/2014/09/03/Speed-up-webfonts/ has an example on how to use it.
Basically you add a src url to the woff2 file and specify the woff2 format. It is important to have this before the woff-format: the browser will use the first format that it supports.
Jyrki AlakuijalaJyrki Alakuijala
Not the answer you're looking for? Browse other questions tagged css3font-facewebfonts or ask your own question.
Whether you download fonts from a website or have a CD full of typefaces, before you can to use them in your word processor or other software programs you must install TrueType or OpenType fonts in the Windows Fonts folder. It is a simple procedure, but heed the following notes and tips when you install the fonts.
Apple developed the TrueType font standard and licensed it to Microsoft. Adobe and Microsoft worked together to develop the OpenType font standard. Although OpenType is the newest font standard, OpenType and TrueType fonts are both high-quality fonts that are suitable for all applications. They have mostly replaced the older two-part Postscript Type 1 fonts because of the ease of installation and use.
Expand Your Font Options in Windows
To add OpenType or TrueType fonts to your Windows computer:
- Click Start and select Settings > Control Panel (or open My Computer and then Control Panel).
- Double-click the Fonts folder.
- Select File > Install New Font.
- Locate the directory or folder with the font(s) you want to install. Use the Folders: and Drives: windows to move to the folder on your hard drive, a disk, or CD where your new TrueType or OpenType fonts are located.
- Find the font(s)you want to install. TrueType fonts have the extension.TTF and an icon that is a dog-eared page with two overlapping Ts. They require only this one file for installation and use. OpenType fonts have the extension.TTF or .OTF and a little icon with an O. They also require only this one file for installation and use.
- Highlight the TrueType or OpenType font to install from the list of fonts window.
- Click OK to complete the TrueType or OpenType font installation.
Tips for Font Installation
- Put installed fonts on your hard drive. If you are going to install TrueType or OpenType fonts from a CD be sure Copy fonts to folder is checked; otherwise, fonts may not be available to use if the CD is not in the drive at all times.
- Use the right fonts for Windows. There are slight differences in the TrueType fonts designed for each OS. Therefore Mac and Windows users cannot share TrueType fonts. However, OpenType fonts are cross-platform. The same font file works under both MacOS and Windows operating systems.
- Restart the computer. If you have programs running while you install fonts in Windows, they may require that you exit the application and restart for the new fonts to be available in the font menu.
- Avoid font duplication. OpenType fonts install in the same manner as TrueType fonts and coexist peacefully with TrueType and PostScript Type 1 fonts. However, it is wise not to have the same font installed in multiple formats. That is, don't install both Helvetica in TrueType format and Helvetica in Type 1 format at the same time. This could cause font conflicts when you try to use the fonts.