{"record":{"id":"2f03d5cd43ff8643","repo":"kovidgoyal/kitty","slug":"ignoring-invalid-font-feature-feat","errorCode":null,"errorMessage":"Ignoring invalid font feature: {feat}","messagePattern":"Ignoring invalid font feature: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":1084,"sourceCode":"    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)\n    if mtype is None:\n        log_error(f'Ignoring invalid modify_font with unknown modification type: {parts[pos]}')\n        return\n    pos += 1\n    font_name = ''\n    if mtype is ModificationType.size:\n        font_name = parts[pos]\n        pos += 1","sourceCodeStart":1066,"sourceCodeEnd":1102,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1066-L1102","documentation":"Within a font_features line, one of the feature tokens could not be parsed as a ParsedFontFeature (ValueError). The bad feature is skipped; other features on the line still apply.","triggerScenarios":"A malformed feature token such as 'ss01' (missing +/-), '+ss0q' (invalid characters), or '+toolongfeaturename'.","commonSituations":"Typos in OpenType feature tags; forgetting the + or - prefix; using CSS-style syntax like 'ss01=1'.","solutions":["Use standard OpenType feature syntax: 4-character tag preceded by + or -, e.g. +ss01.","Remove the offending token and re-test.","Check the font's supported features with a tool like fonttools if unsure."],"exampleFix":"# before\nfont_features FiraCode ss01 zero\n\n# after\nfont_features FiraCode +ss01 +zero","handlingStrategy":"validation","validationCode":"import re\ndef valid_feature(tok: str) -> bool:\n    return bool(re.fullmatch(r'[+-][a-zA-Z0-9]{4}', tok))","typeGuard":"def is_ot_feature(tok: str) -> bool:\n    return len(tok) == 5 and tok[0] in '+-' and tok[1:].isalnum()","tryCatchPattern":null,"preventionTips":["Use +tag/-tag with exactly 4 alphanumeric characters","Test features with fonttools before adding to config"],"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"}