Skip to content

fix(font): reset explicit kitty bold/italic font variants to auto on font set - #9168

Open
harshithnadig wants to merge 3 commits into
omacom:quattrofrom
harshithnadig:fix/kitty-font-variants
Open

harshithnadig wants to merge 3 commits into
omacom:quattrofrom
harshithnadig:fix/kitty-font-variants

Conversation

@harshithnadig

Copy link
Copy Markdown

Fixes #9167

Problem

When omarchy font set <font> is executed, it updates font_family in ~/.config/kitty/kitty.conf, but leaves any explicit bold_font, italic_font, or bold_italic_font configuration lines untouched. This causes bold/italic text in Kitty to continue rendering with the previous font family.

Solution

Update omarchy-font-set to reset bold_font, italic_font, and bold_italic_font in ~/.config/kitty/kitty.conf to auto so Kitty automatically derives the corresponding bold and italic weights from the newly selected font_family.

@ekollof

ekollof commented Oct 1, 2026

Copy link
Copy Markdown

One gap carried over from the review comparison (context: #12171, now closed in favor of this): the reset line handles the face line itself, but not a kitty \-continuation split across lines. bold_font Old followed by \ Bold becomes bold_font auto plus the stale \ Bold, which kitty joins back onto it (auto Bold). Same gap exists in the font_family rewrite on quattro.

Rare in practice (needs a hand-split face), but if you want it covered I'm happy to put up a small follow-up on top of this that drops leading-\ continuation lines of any rewritten face line, with a test. Just say the word.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 527355e against quattro. The fix works and is the right size: one line that resets any explicit bold_font, italic_font or bold_italic_font to auto after either the rewrite or the append of font_family, so kitty derives those faces from the new family.

Reproduced on a disposable Omarchy worker, by checking what kitty's own config parser loads from /etc/xdg/kitty/kitty.conf plus ~/.config/kitty/kitty.conf after omarchy font set, rather than grepping the file:

  • An active font_family with all three faces set explicitly: on quattro all three stay on the old font. On this branch all three load as auto.
  • The config Omarchy ships today, where font_family is commented out and the first font set appends one, with an explicit bold_font: on quattro bold stays on the old font. On this branch it loads as auto.
  • An indented face line: same result as above.
  • A config with no face lines gains none.

With the added line reverted, the first three fail again. The branch merged with current quattro gives the same results. test/shell.d/font-set-test.sh and test/shell.d/kitty-config-test.sh pass on the worker. ./test/cli stops at vscode generated theme references current theme file, which fails the same way on quattro. That failure has nothing to do with this change, but it means the CLI tests after it did not run on either tree.

Compared with #13235, the other open fix for #9167: run the same way, it leaves bold_font on the old font in the shipped layout, because its face loop sits only in the branch that rewrites an existing font_family. This pull request covers both branches.

Two limits, neither found to be a regression. A face set deliberately to another family or style is reset to auto too, which is what a font set has to do to avoid this bug. As @ekollof notes above, a face split across a \ continuation line keeps its stale tail. The existing font_family rewrite on quattro has the same gap.

No second opinion ran on this pull request. The configured reviewer, Codex Medium, had used up its daily review budget, so everything above is one model's work (Claude Opus 5.5). This waits on that second review before it can be marked ready, and then on the maintainer.

omarchybot and others added 2 commits November 1, 2026 14:20
Move the font set face check into the existing Kitty test, as AGENTS.md asks of a new test, and cover the shipped config, where font_family is commented out and the first font set appends it, plus an explicit face that follows an earlier auto line. Both cases come from omacom#13235, with the expectation changed to the auto reset this pull request makes.

Co-Authored-By: Raj-Jagadeesh-A-P <rajjagadeesh2006@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed again at 7bc7002 against current quattro. The fix works on both paths, and I've pushed two commits to this branch.

What I pushed:

Checked on a disposable Omarchy worker by running omarchy font set and then asking Kitty's own config parser which faces it loads:

  • An active font_family with explicit and indented faces: on quattro, and on this branch with the fix line removed, bold, italic and bold-italic all load the old font. On this branch all three load as auto.
  • The shipped config with an explicit bold_font: same result.
  • A config with no face lines gains none.

kitty-config-test.sh fails on quattro (each of the two new assertions separately) and with the fix removed, and passes on this branch. ./test/cli passes in full. ./test/shell has 4 failures in ascii-test.sh, branding-about-animation-test.sh, first-run-test.sh and runtime-smoke-test.sh. Each fails the same way on quattro, so none comes from this change.

Second opinion: Codex Medium and muse-wonder (pi, thinking high) reviewed this head. muse-wonder found no defects. Codex found one, and I confirmed it with Kitty's parser. It is the gap @ekollof described above: a face split across a \ continuation line, like bold_font JetBrainsMono followed by \ Nerd Font, becomes bold_font auto plus the stale tail. Kitty joins the two into auto Nerd Font, so that face does not follow the new family. The font_family rewrite already on quattro has the same gap. Fixing it properly means handling continuation lines for every key font set rewrites, which goes beyond #9167, and @ekollof has offered a follow-up for it. I haven't changed it here. The reviewers saw my framing of the change, so their agreement elsewhere isn't fully independent of my review.

This is waiting on the maintainer to decide whether the continuation case should block this or go in that follow-up. Nothing is needed from you.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

omarchy-font-set now resets explicit Kitty bold and italic faces to auto when changing fonts.

  • Kitty’s bold and italic fonts follow the family you set.

Reviews (1) · Last reviewed commit: "Test the kitty face reset in kitty-confi..." · Reviewed by Greptile

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy font set leaves bold_font/italic_font stale in kitty.conf — bold text renders the old font

3 participants