Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WOFF2-only CSS option #162

Closed
Timmmm opened this issue Nov 27, 2022 · 9 comments · Fixed by #173
Closed

WOFF2-only CSS option #162

Timmmm opened this issue Nov 27, 2022 · 9 comments · Fixed by #173

Comments

@Timmmm
Copy link

Timmmm commented Nov 27, 2022

"Modern browsers" includes WOFF even though global support for WOFF2 is 97%. Given that they're only fonts and it's hardly a disaster if they don't load, I think that option should ditch WOFF and have WOFF2 only.

@Timmmm
Copy link
Author

Timmmm commented Nov 27, 2022

"Modern browsers" also shouldn't include local('') which is apparently for IE6-8 and can break Android: #84

@majodev
Copy link
Owner

majodev commented Jan 29, 2023

v1.1.0 removeslocal(''). However, for sanity I'll keep .woff in for now.

@Timmmm
Copy link
Author

Timmmm commented Jan 29, 2023

Nice. What do you mean "for sanity"?

@thestinger
Copy link

Internet Explorer 11 isn't supported anymore so I really don't think including woff is needed for a modern browser option.

https://caniuse.com/?search=woff

@gitressa
Copy link

I would also prefer it, if there were a .woff2-only option. I usually remove .woff-files to reduce complexity and size, and just use .woff2.

Example, with 12 Roboto fonts:

Versions Files Size
.woff + .woff2 24 453,5 kB
.woff2 12 198,6 kB

@Rotzbua
Copy link
Contributor

Rotzbua commented May 7, 2023

The support modes should be renamed to reflect the current state of technology:

Old label New label Format
- Modern Browser woff2
Modern Browser Best Support woff2 + woff
Best Support Legacy Support woff2 + woff + ttf + svg + eot

@thestinger
Copy link

IE11 is no longer supported and is disabled automatically on up-to-date Windows. IE11 has woff1 support and was the oldest browser nearly anyone was interested in supporting. I don't see much of a reason to have anything but woff2. Sites are meant to work without the web fonts being loaded anyway. There are many reasons for modern sites not working in IE11 and not having the right fonts isn't a major issue.

@Rotzbua
Copy link
Contributor

Rotzbua commented May 15, 2023

I have reconsidered my previous suggestion and think the term "best" does not reflect the development status and is very subjective. I think the terms "legacy" and "historic" support are more accurate.

For legacy support, as before suggest, the most obvious format would be woff. Taking the CanIUse's percentages into account, ttf seems a better candidate. ttf supports more browsers and the uncompressed source form of woff(2). If necessary the compression can be applied by http transport compression gzip if a legacy browsers has support.

Adding the percentages of OperaMini (does not support any custom font) current global usage is:

Format % caniuse
woff2 98,15 link
woff 99,62 link
ttf 99,80 link

In summary my updated suggestion would be:

Old label New label Format
- Modern Browser woff2
Modern Browser Legacy Support woff2 + ttf
Best Support Historic Support woff2 + ttf + woff + svg + eot

And the website would look like:

fonts

@gitressa
Copy link

Perfect, thanks @Rotzbua and @majodev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants