{"record":{"id":"477518e48cdc9da9","repo":"kovidgoyal/kitty","slug":"ignoring-invalid-font-features-val","errorCode":null,"errorMessage":"Ignoring invalid font_features {val}","messagePattern":"Ignoring invalid font_features (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":1076,"sourceCode":"    ans = to_bool(val)\n    if ans and dict_with_parse_results is not None:\n        dict_with_parse_results['mouse_map'] = [None]\n    return ans\n\n\ndef clear_all_shortcuts(val: str, dict_with_parse_results: dict[str, Any] | None = None) -> bool:\n    ans = to_bool(val)\n    if ans and dict_with_parse_results is not None:\n        dict_with_parse_results['map'] = [None]\n    return ans\n\n\ndef font_features(val: str) -> Iterable[tuple[str, tuple[defines.ParsedFontFeature, ...]]]:\n    if val == 'none':\n        return\n    parts = val.split()\n    if len(parts) < 2:\n        log_error(f'Ignoring invalid font_features {val}')\n        return\n    if parts[0]:\n        features = []\n        for feat in parts[1:]:\n            try:\n                features.append(defines.ParsedFontFeature(feat))\n            except ValueError:\n                log_error(f'Ignoring invalid font feature: {feat}')\n        yield parts[0], tuple(features)\n\n\ndef modify_font(val: str) -> Iterable[tuple[str, FontModification]]:\n    parts = val.split()\n    pos, plen = 0, len(parts)\n    if plen < 2:\n        log_error(f'Ignoring invalid modify_font: {val}')\n        return\n    mtype: ModificationType | None = getattr(ModificationType, parts[pos], None)","sourceCodeStart":1058,"sourceCodeEnd":1094,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1058-L1094","documentation":"A font_features line must be 'font_features <family> <feature...>' with at least two tokens. With fewer than 2 parts (or only 'none' being special), kitty logs this and ignores the whole line.","triggerScenarios":"font_features with a single token, e.g. 'font_features +ss01' missing the font family prefix, or an empty-ish value other than 'none'.","commonSituations":"Forgetting the font family argument; assuming features apply globally without specifying a family; using 'font_features none' correctly (no error) vs malformed lists.","solutions":["Add the font family as the first token: font_features <family> <features...>.","Example: font_features FiraCode +ss01 +zero","Use 'font_features none' to disable."],"exampleFix":"# before\nfont_features +ss01\n\n# after\nfont_features FiraCode +ss01","handlingStrategy":"validation","validationCode":"def valid_font_features(val: str) -> bool:\n    if val == 'none':\n        return True\n    parts = val.split()\n    return len(parts) >= 2","typeGuard":"def is_font_features_shaped(val: str) -> bool:\n    p = val.split()\n    return val == 'none' or len(p) >= 2","tryCatchPattern":null,"preventionTips":["Always prefix features with the font family","Use 'none' to disable"],"tags":["kitty","config","font","font-features"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}