Tweet

I googled for a different non-tweet source but the results were shit.

  • Daniel@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 months ago

    It’s actually not uncommon for icons (and occasionally animations) to be loaded as fonts. This is why if you force your web browser to only display a certain font and go to certain websites they display strangely, or just have slightly broken loading screens.

    On the web this is (mainly) for optimization. If a website has a few icons there is no problem with loading a few SVGs, or (if there is a very small number) raster images can get a pass. Although, if you’re building an application with a large number of icons (think most hyper-interactive data-driven sites) for every SVG you load that is (unless embedded directly in HTML) a single HTTP request, computers (generally, in most cases) take longer to complete several smaller operations than one big one — these means that compiling your icons into a font is much more optimized than loading them individually.

    Now, considering this is Windows (where they don’t particularly seem to care about heavy optimizations and fine tuning) I’m sure it was just easier for them to write a single thing that renders a font instead of something that renders a font and another thing that renders images/animations.