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

Order of font types in generated css is suboptimal #21

Closed
dwt opened this issue Jun 26, 2018 · 1 comment
Closed

Order of font types in generated css is suboptimal #21

dwt opened this issue Jun 26, 2018 · 1 comment
Assignees
Milestone

Comments

@dwt
Copy link

dwt commented Jun 26, 2018

Hi there,

while optimizing the generated css I noticed that by default (if all formats are requested) you generate .woff references before .woff2 in the css file.

From my testing, this leads compatible browsers (current Firefox, Safari, Chrome) to prefer the slightly larger .woff files over the more optimal .woff2.

Therefore I propose to switch the default order. (This is also something that FontAwesome does by the way, which I where I first noticed this).

What do you think?

@neverpanic neverpanic self-assigned this Jun 26, 2018
@neverpanic neverpanic added this to the next milestone Jun 26, 2018
neverpanic added a commit that referenced this issue Jun 26, 2018
Apparently browsers process the list of fonts in-order and stop at the
first supported option. For this reason, it does not make sense to put
WOFF2 after WOFF when generating both, as reported in #21. Instead,
change the order of the 'all' default format to start with WOFF2 and
WOFF, sort the older formats towards the end and change the
recommendation to use WOFF2 and WOFF.

Closes: #21
@dwt
Copy link
Author

dwt commented Jun 27, 2018

Great! Thanks!

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

No branches or pull requests

2 participants