Font matching (CSS Fonts 4, §5) runs per character, not per element:
- Take the next name in
font-family. A generic (serif,system-ui) maps to a real family; other names are looked up in@font-facerules first, then installed fonts. A name defined by@font-facenever falls through to an installed font of the same name, even if every face fails to load. - Narrow that family's faces by
font-width, thenfont-style, thenfont-weight. For@font-facefaces the descriptors count, not what the file contains. - If the chosen face has a glyph for the character, use it. If not, move to the next family; other faces in the same family aren't tried.
- After the list runs out, the browser's own system fallback picks a font.
The weight search is the part people get wrong. A target below 400 looks lighter first, then heavier; above 500, heavier first, then lighter. From 400 to 500 it looks up to 500, then lighter, then above 500. So font-weight: 400 with faces at 300, 500 and 700 picks 500.
Order matters too: style beats weight. font: italic 700 in a family with a regular italic and an upright bold picks the italic and makes it bold another way.
That other way is synthesis. When the matched face is lighter or more upright than asked, the browser may fake bold (thickening strokes) or oblique (shearing glyphs). font-synthesis: none, or the longhands font-synthesis-weight and font-synthesis-style, turn it off, so missing faces render at their real weight. A variable font's wght, wdth, slnt and ital axes aren't synthesis: declare a range (font-weight: 100 900) and the browser treats every value in it as an available face.