{"record":{"id":"9d486cc8480dd6de","repo":"withastro/astro","slug":"no-data-found-for-font-family-bold-family-name","errorCode":null,"errorMessage":"No data found for font family ${bold(family.name)}. Review your configuration","messagePattern":"No data found for font family (.+?)\\. Review your configuration","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/astro/src/assets/fonts/core/compute-font-families-assets.ts","lineNumber":74,"sourceCode":"\t// 500, 600, 700 as normal but also 500 as italic. That requires 2 families\n\tfor (const family of resolvedFamilies) {\n\t\tconst fontAssets = getOrCreateFontFamilyAssets({\n\t\t\tfontFamilyAssetsByUniqueKey,\n\t\t\tfamily,\n\t\t});\n\n\t\tconst _fonts = await fontResolver.resolveFont({\n\t\t\tfamilyName: family.name,\n\t\t\tprovider: family.provider,\n\t\t\t// We do not merge the defaults, we only provide defaults as a fallback\n\t\t\tweights: family.weights ?? defaults.weights,\n\t\t\tstyles: family.styles ?? defaults.styles,\n\t\t\tsubsets: family.subsets ?? defaults.subsets,\n\t\t\tformats: family.formats ?? defaults.formats,\n\t\t\toptions: family.options,\n\t\t});\n\t\tif (_fonts.length === 0) {\n\t\t\tlogger.warn(\n\t\t\t\t'assets',\n\t\t\t\t`No data found for font family ${bold(family.name)}. Review your configuration`,\n\t\t\t);\n\t\t\tconst availableFamilies = await fontResolver.listFonts({ provider: family.provider });\n\t\t\tif (\n\t\t\t\tavailableFamilies &&\n\t\t\t\tavailableFamilies.length > 0 &&\n\t\t\t\t!availableFamilies.includes(family.name)\n\t\t\t) {\n\t\t\t\tlogger.warn(\n\t\t\t\t\t'assets',\n\t\t\t\t\t`${bold(family.name)} font family cannot be retrieved by the provider. Did you mean ${bold(stringMatcher.getClosestMatch(family.name, availableFamilies))}?`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\t// The data returned by the provider contains original URLs. We proxy them.\n\t\t// TODO: dedupe?","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/assets/fonts/core/compute-font-families-assets.ts#L56-L92","documentation":"During font resolution, the configured provider returned zero fonts for a family name (after applying your weights/styles/subsets filters). Astro warns 'No data found for font family X. Review your configuration' and skips the family, then queries the provider's catalog to print a closest-match suggestion (the follow-up warning) when the exact name is not served. The CSS variable for the family will not be backed by any @font-face, so text falls back to system fonts.","triggerScenarios":"A typo'd or wrongly-cased family name (e.g., 'roboto mono' instead of 'Roboto Mono'); a name that provider does not serve; weight/subset/style filters so narrow no variant matches; the provider API unreachable so resolution yields nothing.","commonSituations":"Copy-pasted font configs with wrong casing; CI environments blocking egress to the provider; uncommon weight+subset combinations eliminating all variants; forgetting to set `provider` for a family that only exists under a different provider.","solutions":["Match the exact family name and casing as the provider lists it","Read the very next warning — when the name is close to a catalog entry it suggests 'Did you mean X?'","Relax weights/subsets/styles filters so at least one variant resolves","Check network access to the provider API from your build environment"],"exampleFix":"// astro.config.mjs\n// before\nimport { defineConfig, fontProviders } from 'astro/config';\nfonts: [{ provider: fontProviders.google(), name: 'roboto mono', cssVariable: '--font-mono' }]\n\n// after\nfonts: [{ provider: fontProviders.google(), name: 'Roboto Mono', cssVariable: '--font-mono' }]","handlingStrategy":"validation","validationCode":"// For local providers, verify files exist at config load time\nimport { existsSync } from 'node:fs';\nconst families = [{ name: 'Brand', provider: 'local', src: ['./src/assets/fonts/brand.woff2'] }];\nfor (const f of families) {\n  for (const s of f.src ?? []) if (!existsSync(s)) throw new Error(`missing font file: ${s}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy family names verbatim (including casing) from the provider's catalog","Run a networked CI build so provider resolution failures surface before deploy","Start with default weights/subsets, then narrow filters — verify the family still resolves after each change"],"tags":["fonts","experimental-assets","configuration"],"backgroundTag":"font-family-not-found","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}