Fonts probe.
Renders a baseline string in 30+ common fonts and measures the rendered width. Different width = font is installed.
Width-probing is an older technique. The newer Local Font Access API gives more detail but is restricted to permission-granted enterprise apps in Chrome only.
We append an invisible <span> with the probe text 'mmmmmmmmmwwwwwwwwwlli' at 72 px. For each candidate font we set its font-family to "Candidate", fallback across each of three fallbacks (monospace / serif / sans-serif).
If the rendered width differs from the bare fallback for any of the three, the candidate font must exist on the system (otherwise the browser would have used the fallback). The span is removed after probing.