{"record":{"id":"91b57c4b47b5a7ba","repo":"withastro/astro","slug":"bold-family-name-font-family-cannot-be-retriev","errorCode":null,"errorMessage":"${bold(family.name)} font family cannot be retrieved by the provider. Did you mean ${bold(stringMatcher.getClosestMatch(family.name, availableFamilies))}?","messagePattern":"(.+?) font family cannot be retrieved by the provider\\. Did you mean (.+?)\\?","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/astro/src/assets/fonts/core/compute-font-families-assets.ts","lineNumber":84,"sourceCode":"\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?\n\t\tfontAssets.fonts.push(\n\t\t\t...filterAndTransformFontFaces({\n\t\t\t\tfonts: _fonts,\n\t\t\t\tfamily,\n\t\t\t}),\n\t\t);\n\n\t\tconst result = collectFontAssetsFromFaces({\n\t\t\tfonts: fontAssets.fonts,\n\t\t\tfamily,","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/assets/fonts/core/compute-font-families-assets.ts#L66-L102","documentation":"Emitted immediately after 'No data found for font family X' when the provider does serve fonts but none named exactly as configured. Astro fetches the provider's full font list and prints the closest match by string distance — '<name> font family cannot be retrieved by the provider. Did you mean <match>?' — pointing directly at the typo or naming mismatch.","triggerScenarios":"The family name is edit-distance-close to a real catalog entry: 'Inter Display' vs 'Inter', wrong casing, a dropped suffix, or a spelling error.","commonSituations":"Hand-typed family names; copying display names from a provider's marketing page rather than its API catalog; assuming two providers expose the same name.","solutions":["Rename the family in your config to the exact name quoted after 'Did you mean'","If the suggested name is not what you want, browse the provider catalog for the correct spelling","If the family genuinely only exists under another provider, fix the `provider` field instead of the name"],"exampleFix":"// before\nfonts: [{ provider: fontProviders.google(), name: 'Inter Display', cssVariable: '--font-sans' }]\n\n// after (name suggested by the warning)\nfonts: [{ provider: fontProviders.google(), name: 'Inter', cssVariable: '--font-sans' }]","handlingStrategy":"validation","validationCode":"// Optional: preflight names against the provider catalog (google example)\nconst res = await fetch('https://fonts.googleapis.com/css2?family=Inter&display=swap');\nif (!res.ok) throw new Error(`family not served by provider (status ${res.status})`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the 'Did you mean X?' suggestion as authoritative — rename to it","Keep provider documentation handy when picking names; marketing names often differ from API names","Pin exact names in a shared constants file instead of retyping them"],"tags":["fonts","experimental-assets","typo","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"}