Skip to content

Fix capitals drawn small in the model hub's fallback fonts - #881

Open
sabrinaaquino wants to merge 1 commit into
mainfrom
fix/fallback-font-capitals
Open

sabrinaaquino wants to merge 1 commit into
mainfrom
fix/fallback-font-capitals

Conversation

@sabrinaaquino

Copy link
Copy Markdown
Contributor

On a first visit, model pages usually draw their text in a local fallback font (Arial, or Roboto on Android) because Aeonik isn't ready at the first paint, and that view keeps the fallback. The fallback was scaled three ways to match Aeonik's widths: lowercase up to 118%, capitals down to 93%, digits in between. A capital ended up only 1.09 times the height of a lowercase x instead of about 1.38. Every capital looked like a small capital: "How it's measured", "Text", "Private", "1M", "USD", "POST", "Model ID".

Change: one scale per fallback, matched to Aeonik's x-height: 98.35% for Arial and 96.53% for Roboto. Arial's proportions are almost exactly Aeonik's (capital to x-height 1.38 against 1.37), so capitals land within 1% of Aeonik's. The ascent and descent overrides are recomputed so lines keep the height they had.

Why widths don't need to match anymore: a view never switches fonts after it's drawn. The page is only marked fonts-ready once the build-time first screen is hidden, and a live view that mounts before Aeonik is ready keeps the fallback. Text drawn in the fallback is now a little narrower than Aeonik, so a line can wrap differently than it would in Aeonik, but nothing moves on screen.

Tested: I loaded a model page on localhost with venice.ai/fonts blocked, which forces the fallback:

  • Capitals measure 1.38 times the x-height (1.09 before).
  • Section line heights are unchanged; the only movement is a description that now fits on two lines instead of three.
  • With Aeonik loaded, nothing changes, since the fallback isn't used.
  • The generated files are unchanged.

To see it yourself, block venice.ai/fonts/* in DevTools (Network, Block request URL) and reload a model page.

Until Aeonik loads, the model hub draws its text in Arial, or Roboto on
Android, and a first visit usually keeps that fallback for the whole
view. Each fallback scaled capitals, digits and lowercase separately to
match Aeonik's widths, so a capital stood only 1.09 times as tall as a
lowercase x instead of about 1.38, and words like "How", "Text" and
"POST" read as small capitals.

One scale per fallback, matched to Aeonik's x-height, keeps capitals in
proportion and letters at Aeonik's size. The ascent and descent
overrides change with it, so lines keep their height. Widths no longer
match Aeonik's, which moves nothing: a view that starts on a fallback
keeps it.
@mintlify

mintlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
veniceai 🟢 Ready View Preview Nov 16, 2026, 8:42 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — 8fc1437d Deployed Nov 16, 2026 by mintlify[bot]
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