Font Metrics Adjuster
With this tool, you can adjust @font-face descriptors to match fallback fonts to web
fonts,
minimizing CLS during font loading.
- Font Metrics Override APIs:
ascent-override: Adjust ascent (Upper height from the baseline of the glyph)descent-override: Adjust descent (Lower height from the baseline of the glyph)line-gap-override: the distance between successive lines of text (so-called "leading")
- Glyph Scaling:
size-adjust: Adjust overall font size
- Loading Behavior:
font-display: Control how the font is displayed while it is loading.auto: The font is displayed using the smallest possible font that meets the font-size criteria.block: The font is displayed using the font-size value specified in the font-size property.swap: The font is displayed using the font-size value specified in the font-size property.fallback: The font is displayed using the font-size value specified in the font-size property.
- Character Subsetting:
unicode-range: Control which characters are included in the font.U+0-10FFFF: All charactersU+0-7F: Basic LatinU+0-FF: Latin-1U+4E00-9FFF: CJK Unified Ideographs
π€ DECLAIMER: This is just a demonstration of how to customize font face. Therefore, it's not for practical use, and there's no functionality to use personal web fonts.
π€ DECLAIMER: The changes you make with the adjusters will be debounced for 50ms for the performance reasons.
π€ Well, you can apply the properties to web font, for sure, though it's easier and more
makes
sense to
adjust the fallback
for better
compatibility and maintainability.
Local fonts for fallbacks are OS-dependent, which means that if you try to adjust your web
font
to
fallbacks, you need to adapt all the fonts of the web font according to the OS.
This is likely to be more work than adapting fallbacks to web fonts, so it's better to do the
opposite in practice. ;)
@font-face
π€ There are two possible approaches to generating "improved" font fallbacks. The simpler approach uses only the Font Metric overrides API. The more complicated (but more powerful) approach is to use both the font metric overrides API and size-adjust. You can try both of these approaches.