kovidgoyal/kitty · warning
Ignoring invalid font feature: {feat}
Error message
Ignoring invalid font feature: {feat} What it means
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.
Source
Thrown at kitty/options/utils.py:1084
if ans and dict_with_parse_results is not None:
dict_with_parse_results['map'] = [None]
return ans
def font_features(val: str) -> Iterable[tuple[str, tuple[defines.ParsedFontFeature, ...]]]:
if val == 'none':
return
parts = val.split()
if len(parts) < 2:
log_error(f'Ignoring invalid font_features {val}')
return
if parts[0]:
features = []
for feat in parts[1:]:
try:
features.append(defines.ParsedFontFeature(feat))
except ValueError:
log_error(f'Ignoring invalid font feature: {feat}')
yield parts[0], tuple(features)
def modify_font(val: str) -> Iterable[tuple[str, FontModification]]:
parts = val.split()
pos, plen = 0, len(parts)
if plen < 2:
log_error(f'Ignoring invalid modify_font: {val}')
return
mtype: ModificationType | None = getattr(ModificationType, parts[pos], None)
if mtype is None:
log_error(f'Ignoring invalid modify_font with unknown modification type: {parts[pos]}')
return
pos += 1
font_name = ''
if mtype is ModificationType.size:
font_name = parts[pos]
pos += 1View on GitHub (pinned to 6d5d0c4406)
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.
Example fix
# before font_features FiraCode ss01 zero # after font_features FiraCode +ss01 +zero
Defensive patterns
Strategy: validation
Validate before calling
import re
def valid_feature(tok: str) -> bool:
return bool(re.fullmatch(r'[+-][a-zA-Z0-9]{4}', tok)) Type guard
def is_ot_feature(tok: str) -> bool:
return len(tok) == 5 and tok[0] in '+-' and tok[1:].isalnum() Prevention
- Use +tag/-tag with exactly 4 alphanumeric characters
- Test features with fonttools before adding to config
When it happens
Trigger: A malformed feature token such as 'ss01' (missing +/-), '+ss0q' (invalid characters), or '+toolongfeaturename'.
Common situations: Typos in OpenType feature tags; forgetting the + or - prefix; using CSS-style syntax like 'ss01=1'.
Related errors
- Ignoring invalid font_features {val}
- Ignoring invalid modify_font: {val}
- Ignoring invalid modify_font with unknown modification type:
- Ignoring modify_font with invalid size: {sz}
- Percentage adjustments of {key} must be positive numbers
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/2f03d5cd43ff8643.
Report an issue: GitHub.