{"record":{"id":"e905fe53e3172caa","repo":"JanDeDobbeleer/oh-my-posh","slug":"no-matching-font-found","errorCode":null,"errorMessage":"no matching font found","messagePattern":"no matching font found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cli/font/fonts.go","lineNumber":59,"sourceCode":"\t}\n\n\tfonts, err := fonts()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar asset *Asset\n\tfor _, f := range fonts {\n\t\tif !strings.EqualFold(font, f.Name) {\n\t\t\tcontinue\n\t\t}\n\n\t\tasset = f\n\t\tbreak\n\t}\n\n\tif asset == nil {\n\t\treturn nil, fmt.Errorf(\"no matching font found\")\n\t}\n\n\treturn asset, nil\n}\n\nfunc fonts() ([]*Asset, error) {\n\tif assets, err := getCachedFontData(); err == nil {\n\t\treturn assets, nil\n\t}\n\n\tassets, err := fetchFontAssets(\"ryanoasis/nerd-fonts\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcascadiaCode, err := CascadiaCode()\n\tif err == nil {\n\t\tassets = append(assets, cascadiaCode)","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/blob/0976794618c5ed95de0985dded50de1b4dc914cb/src/cli/font/fonts.go#L41-L77","documentation":"`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>`.","triggerScenarios":"`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).","commonSituations":"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.","solutions":["Run `oh-my-posh font install` with no argument to get the interactive picker listing all valid font names","Copy the exact asset name from the Nerd Fonts releases page (github.com/ryanoasis/nerd-fonts/releases)","Retry with the compact/canonical spelling, e.g. `FiraCode`, `JetBrainsMono`, `Hack`","Check for hyphen/space mistakes: try both \"SourceCodePro\" and \"SourceCode\" variants"],"exampleFix":"// before\noh-my-posh font install fire code\n// after\noh-my-posh font install FiraCode","handlingStrategy":"fallback","validationCode":"// list available fonts and check the requested name first\nassets, _ := availableFontAssets()\nfor _, a := range assets {\n\tif strings.EqualFold(a.Name, requested) {\n\t\treturn install(a) // exact match confirmed\n\t}\n}\nreturn fmt.Errorf(\"%q not in available font list\", requested)","typeGuard":null,"tryCatchPattern":"if err := installFont(\"firecode\"); err != nil {\n\tif strings.Contains(err.Error(), \"no matching font found\") {\n\t\t// fall back to the interactive picker\n\t\treturn ohMyPoshFontInstallInteractive()\n\t}\n\treturn err\n}","preventionTips":["Run `oh-my-posh font install` without arguments to browse exact valid names","Copy font names verbatim from the Nerd Fonts releases page","Normalize spaces/hyphens: try compact forms like FiraCode, JetBrainsMono"],"tags":["fonts","cli","user-input"],"backgroundTag":"no-matching-resource","analyzedSha":"0976794618c5ed95de0985dded50de1b4dc914cb","analyzedAt":"2026-08-31T23:41:19.708Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}