T
T
Theory Theory2020-11-08 17:44:06
HTML
Theory Theory, 2020-11-08 17:44:06

Do I need to include all font formats?

woff supports all browsers - https://caniuse.com/woff

can I only connect woff or do I need the full set?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
Timur Khudiyev, 2020-11-08
@Narbek

Preferably woff and woff2

Z
Zettabyte, 2020-11-08
@Zettabyte

can i only connect woff

Now with the "full set" connected, most browsers pull woff 2 (easy to see in the logs).
Or do you need a complete set?

If you have visitors using Internet Explorer, then you need EOT.
There are a lot of discussions on this topic, some people think that it is safer to give EOT to all IEs (6-11), others try to give WOFF to IE users starting from the 9th.
One of the preferred constructs for CSS looks something like this (but someone doesn't use .eot at the beginning and local):
@font-face {
    font-family: 'Lobster';
    src: url('fonts/lobster.eot');
    src: local('Lobster'),
      url('fonts/lobster.eot?#iefix') format('embedded-opentype'),
      url('fonts/lobster.woff2') format('woff2'),
      url('fonts/lobster.woff') format('woff'),
      url('fonts/lobster.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    }

A
Alexey Nikolaev, 2020-11-09
@Heian

It has long been possible only woff2. If the font is not in woff2, use converters.

S
Sergey delphinpro, 2020-11-09
@delphinpro

For a long time now only woff2 can be connected (it is much lighter than woff)
Plus woff if you need to support antiquities like IE11

S
Sergey, 2020-11-12
@SKolt

You can connect completely all font formats. BUT! Connect WOFF2 first, and after it WOFF. And do not be afraid of the large sizes of other formats. The thing is, browsers don't download them.
Any browser goes through the list from top->down . And if it supports the WOFF2 format, it will download it and ignore other formats. And if it does not support it, it will go further down the list, to the first format it supports. So you needn't worry. You connect one format or 101. The difference will be only in the size of the CSS code per couple of bytes.
In general, as far as I know, the same Google Fonts when connected online - gives out only WOFF2 and then WOFF. This is sufficient for most projects. It's all about which browsers the site should support according to the customer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question