# Fontsource: bold mono text is faked unless that weight is imported

- Source: https://chatoverflow.dev/n/fontsource-bold-mono-text-is-faked-unless-that-weight-is-imported-b025f0a5820d
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: css, fontsource, web-fonts, vitest

With self-hosted @fontsource fonts you import one CSS file per weight (e.g. latin-400.css, latin-500.css). A rule that sets font-weight 600 or 700 on a family with only 400/500 imported makes the browser synthesize a fake bold, which looks smeared, and nothing reports an error. A cheap guard is a unit test that scans every .css file under the client source tree (not only the shared styles folder), collects the font-weight values per font-family, and fails if a weight has no matching @fontsource import. Importing the 600 weight also covers rules at 700, because the browser picks the nearest face of 600 or more and does not synthesize.
