Skip to content

Avoid double scaling Ghostty text - #14261

Open
sanjyay wants to merge 5 commits into
omacom:quattrofrom
sanjyay:fix/ghostty-text-double-scaling
Open

sanjyay wants to merge 5 commits into
omacom:quattrofrom
sanjyay:fix/ghostty-text-double-scaling

Conversation

@sanjyay

@sanjyay sanjyay commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14221.

omarchy display text size 16 writes 12pt to every terminal and sets the GTK text multiplier to 1.3636. Ghostty applies that multiplier again, making its text larger than Foot, Kitty and Alacritty.

Divide Ghostty's configured font size by the effective GTK multiplier, and include that multiplier when reporting its apparent point size. Read the setting back after updates so failed GTK set/reset operations still use the factor actually in effect. Read the previous GTK factor before making changes, then confirm the effective value after updating it. A failed read returns an error before shell or terminal config updates; a failed readback restores the previous GTK multiplier. An unsuccessful rollback is explicitly reported. Reporting shows n/a when the apparent size cannot be determined. Other terminals keep their existing point-size mapping.

Known limitation from the final review: GTK rollback restores the effective multiplier; if the key was previously unset, it leaves that value explicitly set instead of restoring the unset state.

Validation

  • Regression covers every accepted size, multiple GTK interface-font sizes, repeated changes, reset, failed settings writes/reads, GTK rollback, and explicit rollback-failure diagnostics, and preservation of unrelated config. It fails on the original command and passes locally and in a disposable Omarchy VM.
  • Live Ghostty 1.3.1 and Foot 1.28 with JetBrainsMono Nerd Font at monitor scale 1: at 16px, Ghostty cells change from 29×13 to 21×10 pixels; Foot remains 22×10. The one-pixel height difference is present without the extra multiplier too. Report remains terminal font: 12 pt.
  • The same Ghostty process reloads correctly at 16px, 18px and reset. Reset reports 9pt. VM settings restored after testing.
  • Focused regression, Kitty config and command-style checks pass. Final ./test/all run matches untouched base 54e3b53b: the same 14 shell-file failures and CLI VS Code theme failure, with no additional failures. Four files contain skipped checks, including the unavailable native Kitty parser. The runtime smoke test passes; an intermediate run's cleanup race also passed on standalone branch and base reruns.

Before and after

Foot is on the left; Ghostty is on the right.

Before: Ghostty text is oversized

After: Ghostty and Foot text sizes align

Related open PRs #8880 (selected-terminal reporting), #11487 (machine-local font overlays), #13206 (typography defaults), and #6550/#8825 (separate GTK controls) touch this command but do not compensate for Ghostty's GTK multiplier. This keeps those features outside the fix.

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge, with no new actionable issues found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Summary

Compensates for GTK text scaling when setting and reporting Ghostty’s font size.

  • Ghostty text now matches other terminals at selected sizes.

Reviews (5) · Last reviewed commit: "Keep Ghostty scaling checks in desktop h..." · Reviewed by Greptile

Comment thread bin/omarchy-display-text-size Resolved
Comment thread bin/omarchy-display-text-size Resolved
Comment thread bin/omarchy-display-text-size Resolved

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 493bce1f76f2f3d5d2258b7db4ce660c95c3d584.

Reviewed effective GTK factor read-back, rollback after a failed read, Ghostty size compensation, and reporting of apparent point size. I found no actionable production-code defect in this diff. The focused test reaches a macOS grep -P incompatibility, so I am not claiming it passed or that native GTK/Ghostty behavior was verified.

@omarchybot

Copy link
Copy Markdown
Collaborator

I read this pull request at 493bce1f against quattro, along with #14221. Nothing has been run yet: no worker, no suite, no reproduction. It also has no label yet. Each item gets two classifications from two separate models, and only an agreement counts. The second model, Codex Medium, did not run here because omabot used up its daily allowance of reviews before reaching this one. The reviewer itself is reachable. That is a limit on our side and nothing to do with this change.

Nothing is needed from you. omabot will pick this up again on a later pass to classify it, reproduce the Ghostty double scaling on a worker, and run the suite. I will comment again only if that turns up something new.

@omarchybot omarchybot added the bug Something isn't working label Dec 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High, Opus 5.5 High and muse-wonder via pi, thinking high reviewed the diff at a16098966 against #14221 and #15060. The reviews agreed on the effect on existing Ghostty configs, and their independence isn’t guaranteed. Reading back GTK’s effective multiplier lets this change correct Ghostty configs the old command already enlarged on the next size change or reset.

Opus 5.5 High confirmed that bin/omarchy-display-text-size:269 now propagates a failure from Foot’s optional restart notification. When the notification returns no ID, a reset that already applied can exit 1. The GTK rollback at line 145 also turns an inherited value into an explicit override if readback fails. GitHub CI passed. The worker preflight failed, so live Ghostty reproduction and the worker suite remain pending with the maintainer.

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 display text size scales the Ghostty font two times

3 participants