Skip to content

fix(studio): antialias text like the design references - #2199

Merged
kantord merged 1 commit into
mainfrom
fix/studio-antialiased-text
Oct 8, 2026
Merged

kantord merged 1 commit into
mainfrom
fix/studio-antialiased-text

Conversation

@peppescg

@peppescg peppescg commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Studio text renders heavier than the design references, as if bold. The cause is font smoothing: Studio never sets -webkit-font-smoothing, so it stays auto. On macOS, Chromium then smooths light-on-dark text in a way that thickens the stems. Both design references set antialiased on the body. This PR adds antialiased to the existing body rule in apps/web/src/styles.css.

Out of scope: the prototype also sets text-sm (14px) on <body>, while Studio's body stays at 16px. Changing that is a broader decision about the type scale, so this PR leaves it alone. The compared labels are already 14px in both apps.

Evidence

What the references set

  • Prototype (stacklok/mecatl-prototypes, stack/08-tooling): apps/web/index.html:22 has <body class="text-sm antialiased">.
  • SEP cloud UI (stacklok-enterprise-platform, main): enterprise/toolhive-cloud-ui/src/app/layout.tsx:55 puts antialiased in the body className. src/app/global-error.tsx:24 does the same.

Computed styles for the "Project memory" label (Settings > Memory)

Property Studio Prototype
font-family "Inter Variable", ui-sans-serif, ... "Inter Variable", sans-serif
font file inter-latin-wght-normal.woff2 (@fontsource-variable/inter 5.3.0) same file, same version
font-weight / size / line-height 400 / 14px / 20px 400 / 14px / 20px
letter-spacing / font-variation-settings normal / normal normal / normal
color rgb(250, 250, 250) rgb(250, 250, 250)
text-rendering optimizeLegibility auto
font-synthesis none weight style small-caps
-webkit-font-smoothing auto antialiased

Neither text-rendering nor font-synthesis changes stroke weight here. optimizeLegibility controls kerning and ligatures. Synthesis never triggers because the variable font covers weight 400. Font smoothing is the only difference that affects how thick the text looks.

Rendering (Playwright, Chromium on macOS, dark scheme, 1440x900). Toggling only body.style.webkitFontSmoothing on the same page:

  • deviceScaleFactor 1: mean crop luminance goes from 38.6 (auto) to 36.9 (antialiased), so less ink. With antialiased, the Studio label band is pixel-identical (0 differing pixels) to the prototype's.
  • deviceScaleFactor 2: mean luminance goes from 38.1 to 36.9. The difference is still visible.

Before (top) and after (bottom), 1x, zoomed 3x:

before/after 1x

Studio before (top), prototype (middle), Studio after (bottom), 1x, zoomed 3x:

studio vs prototype

At 2x, before:

before 2x

At 2x, after:

after 2x

Verification

Node 26.10.0, pnpm 12.4.2:

  • task studio:install: exit 0
  • task studio:lint: exit 0
  • task studio:typecheck: exit 0
  • task studio:test: exit 0 (server 182/182, web 651/651). The first run hit one unrelated flake, a socket hang-up in global-search.test.tsx. It passed on a clean re-run.

🤖 Generated with Claude Code

Studio left -webkit-font-smoothing at its default (auto). On macOS,
Chromium then renders light text on the dark surfaces with font
smoothing that thickens the stems, so 400-weight Inter reads as if it
were bold next to the design references.

Both references opt into grayscale antialiasing on the body:
- mecatl-prototypes apps/web/index.html:22 (stack/08-tooling):
  <body class="text-sm antialiased">
- SEP toolhive-cloud-ui src/app/layout.tsx:55 (and
  src/app/global-error.tsx:24): body className includes antialiased

Studio and the prototype already match on font file (Inter Variable
5.3.0, latin wght woff2), weight, size, letter-spacing, line-height,
colour and variation settings. With antialiased applied, the Settings
> Memory label renders pixel-identical to the prototype at 1x.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@kantord
kantord merged commit 9c0eb80 into main Oct 8, 2026
31 checks passed
@kantord
kantord deleted the fix/studio-antialiased-text branch October 8, 2026 14:44
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 13, 2026
2 tasks
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.

2 participants