Skip to content

Draw medium and bold text in Geist - #191

Draft
simonhamp wants to merge 1 commit into
feat/notification-settingsfrom
fix/geist-font-weights
Draft

simonhamp wants to merge 1 commit into
feat/notification-settingsfrom
fix/geist-font-weights

Conversation

@simonhamp

Copy link
Copy Markdown
Member

Views ask for font="medium" in 32 places and font="bold" once. Neither was an alias in config/native-ui.php or a file in resources/fonts, so the phone drew that text in the system font (San Francisco on iOS, Roboto on Android) instead of Geist. Found while fixing the HEAD@{last visit} band in #178.

Before: medium and bold text in the system font, next to Geist everywhere else.
After: medium is Geist Medium (500) and bold is Geist Bold (700).

Why those weights: the web's vite.config.ts loads Geist from Bunny at 400, 500, 600 and 700, so a browser draws font-medium at 500 and font-bold at 700. The web's own resources/fonts only has Regular and SemiBold (they're for the Open Graph images), so the two new files come from the official Geist 1.7.2 release. The four Geist files already here are byte-identical to that release, so all six faces match. resources/fonts/OFL.txt already covers them.

They're registered like the others: medium => Geist-Medium and bold => Geist-Bold aliases, with files named <Family>-<Weight>.ttf. mobile-ui looks an alias up by file name on both platforms (iOS reads the PostScript name out of the file, which is Geist-Medium / Geist-Bold anyway). FontsTest no longer skips the two names.

Screens affected

Text that names medium or bold:

  • Log, profiles and orgs: hashtags and "Show more" in commit bodies, the new commits pill, the Trending link on an empty Following log, empty state links, and Retry after a failed refresh.
  • Commit page: the replies / Hide replies toggle, the earlier commits row, the stargazers sheet, and a poll option you voted for.
  • Notifications: the group toggle and "Show older". Notification settings: each kind's label.
  • Messages: author names, the replied-to author, link preview titles, "Replying to", hashtags, and Show more / Show less on a pinned message.
  • Composer: "Add option" on a poll, "Submit at" and "Scheduled commits" on the schedule picker, and the ALT badge on a photo (the one bold).
  • Scheduled commits, This device, Safety, Remotes ("Back to your log"), Add org members ("Share history") and the push prompt title.

Watch for this: the default font is Geist-Regular, and mobile-ui picks a sibling file when something asks it for a weight. Before, a medium request found only Regular and SemiBold and fell back to Regular. Now it gets Medium. So every button label (66 buttons, none set a font), the labels on the outlined text inputs, select, radio group and date picker, and the GitHub @mention link on profile and org headers move from Geist Regular to Geist Medium. That is what the web draws for its buttons (font-medium). Anything that asks the default font for bold now gets Bold rather than SemiBold.

Tests: 1,914 passed, run serially.

Screenshots

None yet. This goes into the iPhone test build first; simulator and emulator shots can go in before it leaves draft.

  • No visible change

🤖 Generated with Claude Code

Views ask for font="medium" in 32 places and font="bold" once, but neither
was an alias or a bundled file, so iOS and Android drew that text in the
system font.

The web loads Geist at 400, 500, 600 and 700 from Bunny, so a browser draws
font-medium at 500 and font-bold at 700. This adds Geist Medium and Geist
Bold from the official Geist 1.7.2 release (the release the existing Geist
files are byte-identical to) and aliases them as medium and bold.

FontsTest no longer skips the two names.

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