Skip to content

Bundle Ubuntu Sans and Ubuntu Sans Mono (zennotes#890) - #43

Merged
adibhanna merged 2 commits into
mainfrom
feat/890-bundled-fonts
Oct 5, 2026
Merged

adibhanna merged 2 commits into
mainfrom
feat/890-bundled-fonts

Conversation

@adibhanna

Copy link
Copy Markdown
Contributor

Closes the iOS side of ZenNotes/zennotes#890: Settings → Typography now offers Ubuntu Sans and Ubuntu Sans Mono on iPhone and iPad, as the Android app has since 1.1.3.

What ships. public/fonts/ is a byte-identical copy of the Android shell's files (diff -r clean): 24 woff2 subsets (Latin, Cyrillic, Greek; upright and italic; Ubuntu Sans 100 to 800, Ubuntu Sans Mono 400 to 700), fonts.css with the @font-face rules, and the Ubuntu Font Licence (UFL.txt). index.html links the stylesheet; listSystemFonts offers both names in the interface, text and monospace menus. About 0.55 MB more download; WebKit fetches a subset only when text is drawn in that family.

Tests. The list moved to src/bridge/typography-fonts.ts; typography-fonts.test.ts (6 tests) checks both families are offered, each has upright and italic Latin faces, every face points at a woff2 that ships, no file ships unused, each file is real woff2, the licence ships, and index.html links the CSS. npm test 186/186, npm run typecheck clean.

Simulator (iPad Pro 13-inch, iOS 27.0). Picking Ubuntu Sans Mono for Monospace, then Ubuntu Sans for Text and Interface, through the real menus set the editor, code and app chrome in those fonts; a load probe showed the bundled Latin, Cyrillic and Greek faces loading.

Not bundled: Monaco. It is Apple's macOS font, licensed with macOS only and not part of iOS. Menlo is in the list and SF Mono is the default.

Found, not changed here: "New York" in the list does not render on iOS (WebKit cannot address it by family name, so it falls back), and the first launch after a simulator boot can stay blank on this Xcode 27 setup until relaunched; both predate this change.

…nd iPad

Settings → Typography could only offer fonts iOS ships, so the Ubuntu
families the Android app bundles were missing on iPad and iPhone
(ZenNotes/zennotes#890). The shell now ships the same files Android does
(public/fonts, byte-identical: woff2 subsets for Latin, Cyrillic and Greek,
upright and italic, Ubuntu Sans 100 to 800 and Ubuntu Sans Mono 400 to 700,
with fonts.css and the Ubuntu Font Licence), links the stylesheet from
index.html, and offers both names in the interface, text and monospace
menus. The list moved to typography-fonts.ts so a test can hold every
offered bundled face to a file that ships, and no file ships unused.

About 0.55 MB more download. WebKit fetches a subset only once text is drawn
in a bundled family, so cold start pays for the few KB of declarations.

Monaco is not bundled: it is Apple's macOS font, licensed with macOS only,
and not part of iOS. Menlo is in the list and SF Mono is the default.

Checked on an iPad Pro 13-inch simulator (iOS 27.0): picking the families
through the real menus set the editor, code and app chrome in them, and the
bundled Latin, Cyrillic and Greek faces loaded.
)

A high-severity advisory for braces (stack exhaustion on deeply nested
patterns, no fixed release) failed the production npm audit gate on every
pull request. It reached production through @excalidraw/excalidraw, which
lists sass 1.51.0 as a dependency; that sass pulls in chokidar 3, which
pulls in braces. Excalidraw never loads sass at runtime: nothing in its
build output imports it.

Excalidraw's sass is overridden to 1.103.1, the version the desktop repo
already carries. It watches files with a chokidar that has no braces, so
braces stays only under build tools. No existing package changes version.
@adibhanna
adibhanna merged commit 5315fc5 into main Oct 5, 2026
1 check passed
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