Previous color font formats embed bitmap files into the OpenType font containers. They do not scale with high quality and have a large binary size. OpenType SVG embeds vectors and scales better but requires complex parsers and rasterisers and does not interact with OpenType variations.
Instead of embedding bitmaps for emoji or entire SVGs, COLRv1 contains shapes vector glyphs that can be layered on top of each other. This allows shape reuse and results in smaller-sized fonts.
You know something good’s landed when two out of the three great Web/CSS resources — here Smashing Magazine and web.dev (*) — write about the same topic: the size-adjust descriptor for @font-face.
To improve font rendering, a great technique is font swapping. The problem however, is that sometimes when the web font loads, it shifts the entire page around since it presents at a slightly different box height size.
By putting size-adjust in the @font-face rule, it sets a global glyph adjustment for the font face. Timing this right will lead to minimal visual change, a seamless swap.
Available in Chromium 92 and (flagged) Firefox 89 at the time of writing. Up-to-date list on “Can I Use …”.
The posts contain links to tools to help you define the perfect size-adjust value.
To self-host Webfonts from Google Fonts — which you should — there’s google-webfonts-helper which you can use. They offer the entire Google Fonts catalog and provide a way to easily download the fonts and accompanying CSS snippets you need.
New in Unicode 13 is the addition of the Creative Commons License symbols (along with 5382 other characters):
U+0229C No derivatives
U+1F16D Creative Commons
U+1F16E Public Domain
U+1F10D No rights reserved
Daniel Aleksandersen was quite excited to use these on his site, but then noticed:
No system fonts — font files pre-installed with operating systems — support these new characters yet. Even if some system fonts added these characters today, the updated versions won’t reach visitors’ devices until a couple of years from now.
To solve this he created a minimal webfont CC Symbols that only contains the copyright symbol (U+00A9) and the 7 new CC license symbols.
To use it, load it as a webfont and limit its use to only the 8 characters it supports with unicode-range
Variable fonts let you add nuance and artistry to your web typography without bogging down your site. Now you can accomplish what used to require several files with a single file and some CSS!
The goal of this site is to show you how variable fonts tick. Discover how they can benefit user interface (UI) design, accessibility, and long-form reading, and how they push the boundaries of skillful typographic expression on the web.
Google Fonts is great, but it also has a downside: it affects your page’s waterfall (during which some render-blocking may occur, as it involves CSS) as explained by Barry Pollard:
The problem is that your website (say www.example.com) loads the stylesheet from fonts.googleapis.com, which returns some CSS made up of font-face declarations.
This means you have to connect to fonts.googleapis.com, download the CSS, then connect to fonts.gstatic.com to download the actual fonts.
Fonts are often discovered late by the browser when loading a page (as you need to download the CSS to see them) but Google Fonts are discovered extra late, as you need to download the CSS from another domain, then the fonts from a 3rd domain and, as discussed above, making an HTTPS connection takes time.
This post goes really deep into how it all works. Covers things such as rel="preconnect", font-display: swap;, etc.
As of late May Google Fonts has added support for a display querystring parameter. Using it you can control the CSS font-display Property which allows you to control what happens while the font is unavailable.
Specifying https://fonts.googleapis.com/css?family=Roboto&display=swap as the font to load, will yield the following:
Web fonts are awesome. They make your sans-serifs slabby, your headers special and your website look gorgeous. But fonts are a resource, and downloading resources always comes as a cost — if you don’t load web fonts efficiently, what you get instead are phantom underlines, blank pages, and user rage. Let’s talk about ways to avoid this, and what new platform features are here to help us deliver pretty (but also!) fast experiences to everyone.
By using CSS font-display you can tweak how browsers should behave.
The accompanying “Font-display playground” is a small explainer accompanying this talk. In short, the essence of how font-display works can be boiled down to this image:
Variable Fonts are still in active development […] in this article I’ll focus on what they mean for web developers, and how you can try them out today ahead of time.
Next to changes to font-weight(which will allow increments of 1), you also have fine control over a variable font its variations – see image above. One can tweak ‘m via the upcoming font-variation-settings CSS Property: