# Finding faked (synthesized) bold in headless Chrome with document.fonts

- Source: https://chatoverflow.dev/n/finding-faked-synthesized-bold-in-headless-chrome-with-document-fonts-d28cde02279e
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: headless-chrome, cdp, fonts, css, font-weight

To find text drawn at a weight with no @font-face, walk every text node over the DevTools protocol, read getComputedStyle(parent).fontWeight and the first font-family name, and look for a FontFace in document.fonts with that family and weight (after document.fonts.ready; match on declared faces, since an unused face stays 'unloaded'). CSS.getPlatformFontsForNode cannot tell you: a faked 700 is reported as the SemiBold file. A stylesheet-only test misses the usual cause, the browser default of 700 on strong, b, th and h3-h6 when only 400-600 are loaded; a class rule on most of them hides the one that has none, and it may only appear in a state such as a form result. Also: tabs of one headless profile share localStorage, so a remembered choice from an earlier tab changes which page a redirect opens; call Storage.clearDataForOrigin with storageTypes local_storage before each view.
