JanDeDobbeleer/oh-my-posh · warning

no matching font found

Error message

no matching font found

What it means

`ResolveFontAsset` fuzzy-matches a user-supplied font name against the list of assets fetched from the font release (case-insensitive, substring style matching). When no asset's name matches the requested name, it returns this error with no asset. It is the CLI's "typo or unknown font" signal for `oh-my-posh font install <name>`.

Source

Thrown at src/cli/font/fonts.go:59

	}

	fonts, err := fonts()
	if err != nil {
		return nil, err
	}

	var asset *Asset
	for _, f := range fonts {
		if !strings.EqualFold(font, f.Name) {
			continue
		}

		asset = f
		break
	}

	if asset == nil {
		return nil, fmt.Errorf("no matching font found")
	}

	return asset, nil
}

func fonts() ([]*Asset, error) {
	if assets, err := getCachedFontData(); err == nil {
		return assets, nil
	}

	assets, err := fetchFontAssets("ryanoasis/nerd-fonts")
	if err != nil {
		return nil, err
	}

	cascadiaCode, err := CascadiaCode()
	if err == nil {
		assets = append(assets, cascadiaCode)

View on GitHub (pinned to 0976794618)

Solutions

  1. Run `oh-my-posh font install` with no argument to get the interactive picker listing all valid font names
  2. Copy the exact asset name from the Nerd Fonts releases page (github.com/ryanoasis/nerd-fonts/releases)
  3. Retry with the compact/canonical spelling, e.g. `FiraCode`, `JetBrainsMono`, `Hack`
  4. Check for hyphen/space mistakes: try both "SourceCodePro" and "SourceCode" variants

Example fix

// before
oh-my-posh font install fire code
// after
oh-my-posh font install FiraCode
Defensive patterns

Strategy: fallback

Validate before calling

// list available fonts and check the requested name first
assets, _ := availableFontAssets()
for _, a := range assets {
	if strings.EqualFold(a.Name, requested) {
		return install(a) // exact match confirmed
	}
}
return fmt.Errorf("%q not in available font list", requested)

Try / catch

if err := installFont("firecode"); err != nil {
	if strings.Contains(err.Error(), "no matching font found") {
		// fall back to the interactive picker
		return ohMyPoshFontInstallInteractive()
	}
	return err
}

Prevention

When it happens

Trigger: `downloadAndInstall`/`Install` call `ResolveFontAsset(name)` and the loop over fetched assets ends with `asset == nil` — the requested name matched no released font asset (e.g. `oh-my-posh font install firacode` when the asset is named "FiraCode" with different casing handled, but "fira code" with a space or "firecode" does not match).

Common situations: Typo in the font name; using the human font name instead of the exact release asset naming (e.g. "JetBrainsMono" vs "JetBrains Mono"); requesting a font not included in the Nerd Fonts release set; network fetch of assets succeeded but list is narrower than expected.

Related errors


AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31). Data as JSON: /api/errors/e905fe53e3172caa. Report an issue: GitHub.