{"record":{"id":"d43140f9cfa0deb5","repo":"remotion-dev/remotion","slug":"subset-subset-is-not-available-for-the-variable-font-meta","errorCode":null,"errorMessage":"subset: ${subset} is not available for the variable font '${meta.fontFamily}'","messagePattern":"subset: (.+?) is not available for the variable font '(.+?)'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/google-fonts/src/base.ts","lineNumber":300,"sourceCode":"\t\t\t\t\tavailableSubsetKeys,\n\t\t\t\t\tmetaSubsets: meta.subsets,\n\t\t\t\t\trequestedSubset,\n\t\t\t\t}),\n\t\t\t),\n\t\t),\n\t];\n\tconst promises: Promise<void>[] = [];\n\n\tfor (const subset of subsets) {\n\t\tif (typeof FontFace === 'undefined') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst font = fontFacesForStyle.find(\n\t\t\t(fontFace) => fontFace.subset === subset,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`subset: ${subset} is not available for the variable font '${meta.fontFamily}'`,\n\t\t\t);\n\t\t}\n\n\t\tconst fontKey = [\n\t\t\tmeta.fontFamily,\n\t\t\t'variable',\n\t\t\tfont.style,\n\t\t\tfont.weight,\n\t\t\tfont.stretch,\n\t\t\tfont.subset,\n\t\t\tfont.src,\n\t\t].join('-');\n\t\tconst previousPromise = loadedFonts[fontKey];\n\t\tif (previousPromise) {\n\t\t\tpromises.push(previousPromise);\n\t\t\tcontinue;\n\t\t}","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/google-fonts/src/base.ts#L282-L318","documentation":"After selecting the variable font faces for the requested style, loadVariableFont() looks up each requested subset among those faces. This error is thrown when a subset name passed in options.subsets does not exist for that font+style combination, so no font file can be downloaded for it.","triggerScenarios":"Calling loadVariableFont() with a subset string that the font's fontFaces (for the given style) do not include, e.g. {subsets: ['korean']} on a Latin-only font, a typo like 'latn' instead of 'latin', or a subset that exists in meta.subsets but not in the variable font faces for that style.","commonSituations":"Hand-editing subset lists; assuming all Google Fonts share the same subset names; fonts where variable faces cover fewer subsets than the static faces; code generated from outdated metadata after the fonts package was regenerated.","solutions":["Remove the unsupported subset or replace it with one listed in the font's metadata (check meta.subsets / fontFaces subsets)","Fix the typo in the subset name (subset names are lowercase kebab strings like 'latin', 'latin-ext')","Reinstall/update @remotion/google-fonts so the font metadata and available subsets match your code"],"exampleFix":"// before\nawait loadVariableFont(font, {style: 'normal', subsets: ['korean']});\n// after\nawait loadVariableFont(font, {style: 'normal', subsets: ['latin']});","handlingStrategy":"validation","validationCode":"const available = new Set(\n  font.meta.variable.fontFaces.filter((f) => f.style === style).map((f) => f.subset),\n);\nconst bad = subsets.filter((s) => !available.has(s));\nif (bad.length) throw new Error(`Unsupported subsets: ${bad.join(', ')}`);","typeGuard":"function supportsSubsets(meta: FontMeta, style: string, subsets: string[]): boolean {\n  if (!meta.variable) return false;\n  const avail = new Set(meta.variable.fontFaces.filter((f) => f.style === style).map((f) => f.subset));\n  return subsets.every((s) => avail.has(s));\n}","tryCatchPattern":"try {\n  await loadVariableFont(font, {style: 'normal', subsets});\n} catch (e) {\n  if ((e as Error).message.includes('is not available for the variable font')) {\n    await loadVariableFont(font, {style: 'normal', subsets: ['latin']});\n  } else throw e;\n}","preventionTips":["Copy subset names from the font's metadata rather than typing them by hand","Remember subset availability can differ per style for variable fonts","Keep @remotion/google-fonts updated so metadata matches the API"],"tags":["fonts","subsets","api-misuse"],"backgroundTag":"invalid-argument-value","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}