Skip to content

Render the Omarchy logo sharply at fractional scales - #69

Open
nchudleigh wants to merge 3 commits into
typecraft-dev:mainfrom
nchudleigh:fix/crisp-logo
Open

nchudleigh wants to merge 3 commits into
typecraft-dev:mainfrom
nchudleigh:fix/crisp-logo

Conversation

@nchudleigh

@nchudleigh nchudleigh commented Nov 3, 2026 •

Copy link
Copy Markdown

Problem

At fractional scales the Omarchy logo in the search bar and footer looks blurred. The glyph is drawn on a 15 px grid. At 1.5x the search-bar logo comes out 27 device pixels wide and the footer logo 16.5, so its 1 px strokes straddle device pixels.

Change

  • crispLogoSize() snaps the logo to the nearest multiple of 15 device pixels. It reads window.devicePixelRatio, because Screen.devicePixelRatio reports 1 in layer windows. At 1.5x the search-bar logo goes from 27 to 30 device pixels and the footer logo from 16.5 to 15.
  • The logo renders with Text.NativeRendering, as Omarchy's bar glyphs do, so FreeType hints the strokes onto that grid. Toast icons in the footer keep their size and rendering.

Measured on a 1.5x monitor, half-tone pixels in the search-bar logo fell from 35% to 17%.

  • The launcher's content stays transparent until the surface has the output's size and scale, as Omarchy's Ui/OverlayWindow does (omacast can't use that component because Omarchy 4.0.x doesn't ship it). Qt sometimes draws the first frame after mapping at scale 1. Before, that frame showed stretched, and the snapped logos visibly jumped when the real scale landed. Opacity keeps keyboard handling live during that frame.

Testing

node --test tests/*.test.js passes. Checked live at 1.5x (screenshots below). Variable-frame-rate recordings across 8 opens show no stretched first frame; before, one appeared within 3 opens.

Screenshots

Search bar, before | after (4x, nearest neighbour):

Search bar logo before and after

Footer, before (top) | after (bottom):

Footer logo before and after

🤖 Generated with Claude Code

nchudleigh and others added 3 commits November 3, 2026 12:15
At 1.5x scale the logo glyph rendered 27 device pixels wide, off the 15 px
grid it is drawn on, so its 1 px strokes straddled pixels and blurred. Snap
its size to the nearest multiple of 15 device pixels (window.devicePixelRatio,
since Screen.devicePixelRatio reports 1 in layer windows) and render it
natively so FreeType hints the strokes onto that grid. Measured on a 1.5x
monitor, half-tone pixels in the logo fell from 35% to 17%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same as the search bar logo: 11 px became 16.5 device pixels at 1.5x, off
the glyph's 15 px grid. Snap it and hint it; toast icons keep their size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Qt draws the first frame after the surface maps at scale 1, before the
output's fractional scale arrives. That frame was shown stretched and soft,
with scale-dependent sizes (the snapped logos) visibly jumping as the real
scale landed. Hold the content transparent until the surface has the
output's size and scale, as Omarchy's OverlayWindow does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant