Giter Site home page Giter Site logo

Reconsider WOFF2 about webfont-dl HOT 8 CLOSED

mathiasbynens avatar mathiasbynens commented on August 18, 2024
Reconsider WOFF2

from webfont-dl.

Comments (8)

mmastrac avatar mmastrac commented on August 18, 2024

Still waiting on Safari and for WOFF2 to make it into the stable channels of every browser unfortunately. I would wager within a year this can flip. Leaving open as a tracking bug.

from webfont-dl.

konklone avatar konklone commented on August 18, 2024

@mmastrac If WOFF2 were listed as an option in the resulting .css file, would browsers which don't support it try and fail to use it, and have broken fonts? Is there any downside to including WOFF2 in the file for browsers that don't support it?

from webfont-dl.

mmastrac avatar mmastrac commented on August 18, 2024

Oh crap -- I think I just realized the confusion. The WOFF2 support page is here: http://caniuse.com/#feat=woff2 (I linked to WOFF by accident)

I'll fix the link on the front page. Does this make sense?

from webfont-dl.

mathiasbynens avatar mathiasbynens commented on August 18, 2024

@konklone

If WOFF2 were listed as an option in the resulting .css file, would browsers which don't support it try and fail to use it, and have broken fonts?

No. (But as webfont-dl inlines the font as a base64-encoded data URL by default, it would increase the resulting file size.)

Is there any downside to including WOFF2 in the file for browsers that don't support it?

No.

TL;DR Everything is awesome!

from webfont-dl.

mmastrac avatar mmastrac commented on August 18, 2024

The downside is basically size, which is somewhat antithetical to the reasons you'd use WOFF2: the byte savings over WOFF.

If you're including WOFF+WOFF2, that'll be on average ~170% of the size of a WOFF-only CSS file (I'd say this is probably something to avoid).

If you inline WOFF2 and link WOFF, cutting edge browsers will potentially save 30-50% on the CSS download, but modern browsers that don't speak WOFF2 yet (Safari, IE) will pay a reasonably large penalty having downloaded the CSS, ignored the WOFF2 and moved on to WOFF.

I'd say that if you can guarantee that most of your users are on Chrome and Firefox 39+ (currently not actually the stable version), then enabling WOFF2 is probably a win. If not, I'd suggest sticking with the default.

from webfont-dl.

mmastrac avatar mmastrac commented on August 18, 2024

I'm quickly revisiting this since the web is moving quickly these days -- http://caniuse.com/#feat=woff2 suggests that WOFF2 is 50%+ of the global market share which means that it might be worth adding a non-default flag to enable this profile.

Adding help wanted.

from webfont-dl.

mmastrac avatar mmastrac commented on August 18, 2024

woff2 support is now at 80% - when I get a chance I'll make this the default.

from webfont-dl.

mmastrac avatar mmastrac commented on August 18, 2024

Committed

from webfont-dl.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.