Skip to content

Instantly share code, notes, and snippets.

View 7sDream's full-sized avatar
😪
I'm not sleepy!

7sDream 7sDream

😪
I'm not sleepy!
View GitHub Profile
@CrendKing
CrendKing / browser-font-fallback.md
Last active May 11, 2024 05:14
browser-font-fallback.md

This document records my conclusions of experimenting Firefox 68 and Chromium 74 font fallback mechanism on Windows, as dated of the writing time.

Definition of font fallback

Both Firefox and Chromium allow users to configure the desired fonts used for displaying HTML in various languages. The HTML language is specified in the <html lang={lang}> tag. For instance, a Chinese webpage could be written as <html lang="zh"> or more specifically <html lang="zh-CN">. English webpage is <html lang="en"> or simplify lefting out the lang tag (although strongly discouraged by the W3C standard). The per-script font setting in Chromium is unlocked with the Advanced Font Settings extension.

When the webpage specify the font list to be used for certain element in CSS, the browsers will first search its font cache for