Page 1 of 1

Font format required for a website

Posted: Sat Nov 06, 2021 2:58 pm
by Pyanepsion
Hello everyone,
I would like to use a font on a web page.
Is it still necessary to systematically use the three usual font formats (WOFF2, WOFF, TTF)? Why?
For example, for the Segoe Historical font, we used to be advised to use the following CSS lines:

Code: Select all

@font-face {
	font-family: "seguihis";
	src: 
	url("fonts/SegoeUIHistoric-Regular.woff2") format("woff2"),
	url("fonts/SegoeUIHistoric-Regular.woff") format("woff"),
	url("fonts/seguihis.ttf") format("truetype");
}
.fontsymbol {
	font-family: "symbol";
}
The problem is that this increases the storage space needed considerably, in this case 3,376,576 bytes instead of, optionally:
—The WOFF2 version uses 770,984 bytes.
—The WOFF version uses 944,020 bytes.
—The TTF version uses 1,604,572 bytes.
Thank you for your explanations.

Re: Font format required for a website

Posted: Sat Nov 06, 2021 6:31 pm
by Erwin Denissen
Most browsers will request the woff2 source. The other files are required for older browsers, so they can also show the web font.

Woff2 uses less bandwidth and is faster to download.

Usually server storage is not an issue, but it is up to you what you prefer to do.

Re: Font format required for a website

Posted: Sat Nov 06, 2021 7:25 pm
by Bhikkhu Pesala
Using FontCreator, I create web versions of my fonts with a smaller glyph coverage. I export OTF, WOFF, and WOFF2 versions of each.