remotion-dev/remotion · error · Error

subset: is not available for the variable font

Error message

subset: ${subset} is not available for the variable font '${meta.fontFamily}'

What it means

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.

Solutions

  1. Remove the unsupported subset or replace it with one listed in the font's metadata (check meta.subsets / fontFaces subsets)
  2. Fix the typo in the subset name (subset names are lowercase kebab strings like 'latin', 'latin-ext')
  3. Reinstall/update @remotion/google-fonts so the font metadata and available subsets match your code

Example fix

// before
await loadVariableFont(font, {style: 'normal', subsets: ['korean']});
// after
await loadVariableFont(font, {style: 'normal', subsets: ['latin']});
Defensive patterns

Strategy: validation

Validate before calling

const available = new Set(
  font.meta.variable.fontFaces.filter((f) => f.style === style).map((f) => f.subset),
);
const bad = subsets.filter((s) => !available.has(s));
if (bad.length) throw new Error(`Unsupported subsets: ${bad.join(', ')}`);

Type guard

function supportsSubsets(meta: FontMeta, style: string, subsets: string[]): boolean {
  if (!meta.variable) return false;
  const avail = new Set(meta.variable.fontFaces.filter((f) => f.style === style).map((f) => f.subset));
  return subsets.every((s) => avail.has(s));
}

Try / catch

try {
  await loadVariableFont(font, {style: 'normal', subsets});
} catch (e) {
  if ((e as Error).message.includes('is not available for the variable font')) {
    await loadVariableFont(font, {style: 'normal', subsets: ['latin']});
  } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/d43140f9cfa0deb5. Report an issue: GitHub.

Appendix: source

Thrown at packages/google-fonts/src/base.ts:300

					availableSubsetKeys,
					metaSubsets: meta.subsets,
					requestedSubset,
				}),
			),
		),
	];
	const promises: Promise<void>[] = [];

	for (const subset of subsets) {
		if (typeof FontFace === 'undefined') {
			continue;
		}

		const font = fontFacesForStyle.find(
			(fontFace) => fontFace.subset === subset,
		);
		if (!font) {
			throw new Error(
				`subset: ${subset} is not available for the variable font '${meta.fontFamily}'`,
			);
		}

		const fontKey = [
			meta.fontFamily,
			'variable',
			font.style,
			font.weight,
			font.stretch,
			font.subset,
			font.src,
		].join('-');
		const previousPromise = loadedFonts[fontKey];
		if (previousPromise) {
			promises.push(previousPromise);
			continue;
		}

View on GitHub (pinned to 46a3a6bf13)