From 829c43d4ce250dc53ba8ce9cc401f10f71b5616b Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Mon, 5 Oct 2026 13:45:07 -0500 Subject: [PATCH 1/2] feat(typography): bundle Ubuntu Sans and Ubuntu Sans Mono on iPhone and iPad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- index.html | 4 + public/fonts/UFL.txt | 96 ++++++++ public/fonts/fonts.css | 232 ++++++++++++++++++ .../ubuntu-sans-italic-cyrillic-ext.woff2 | Bin 0 -> 25836 bytes .../fonts/ubuntu-sans-italic-cyrillic.woff2 | Bin 0 -> 24216 bytes .../fonts/ubuntu-sans-italic-greek-ext.woff2 | Bin 0 -> 13996 bytes public/fonts/ubuntu-sans-italic-greek.woff2 | Bin 0 -> 15160 bytes .../fonts/ubuntu-sans-italic-latin-ext.woff2 | Bin 0 -> 54316 bytes public/fonts/ubuntu-sans-italic-latin.woff2 | Bin 0 -> 39052 bytes ...ubuntu-sans-mono-italic-cyrillic-ext.woff2 | Bin 0 -> 15624 bytes .../ubuntu-sans-mono-italic-cyrillic.woff2 | Bin 0 -> 14016 bytes .../ubuntu-sans-mono-italic-greek-ext.woff2 | Bin 0 -> 8372 bytes .../fonts/ubuntu-sans-mono-italic-greek.woff2 | Bin 0 -> 8276 bytes .../ubuntu-sans-mono-italic-latin-ext.woff2 | Bin 0 -> 35576 bytes .../fonts/ubuntu-sans-mono-italic-latin.woff2 | Bin 0 -> 22552 bytes ...ubuntu-sans-mono-normal-cyrillic-ext.woff2 | Bin 0 -> 13860 bytes .../ubuntu-sans-mono-normal-cyrillic.woff2 | Bin 0 -> 11972 bytes .../ubuntu-sans-mono-normal-greek-ext.woff2 | Bin 0 -> 7408 bytes .../fonts/ubuntu-sans-mono-normal-greek.woff2 | Bin 0 -> 7720 bytes .../ubuntu-sans-mono-normal-latin-ext.woff2 | Bin 0 -> 32168 bytes .../fonts/ubuntu-sans-mono-normal-latin.woff2 | Bin 0 -> 21040 bytes .../ubuntu-sans-normal-cyrillic-ext.woff2 | Bin 0 -> 24280 bytes .../fonts/ubuntu-sans-normal-cyrillic.woff2 | Bin 0 -> 21800 bytes .../fonts/ubuntu-sans-normal-greek-ext.woff2 | Bin 0 -> 13844 bytes public/fonts/ubuntu-sans-normal-greek.woff2 | Bin 0 -> 14784 bytes .../fonts/ubuntu-sans-normal-latin-ext.woff2 | Bin 0 -> 48500 bytes public/fonts/ubuntu-sans-normal-latin.woff2 | Bin 0 -> 38052 bytes src/bridge/mobile-bridge.ts | 18 +- src/bridge/typography-fonts.test.ts | 89 +++++++ src/bridge/typography-fonts.ts | 27 ++ 30 files changed, 453 insertions(+), 13 deletions(-) create mode 100644 public/fonts/UFL.txt create mode 100644 public/fonts/fonts.css create mode 100644 public/fonts/ubuntu-sans-italic-cyrillic-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-italic-cyrillic.woff2 create mode 100644 public/fonts/ubuntu-sans-italic-greek-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-italic-greek.woff2 create mode 100644 public/fonts/ubuntu-sans-italic-latin-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-italic-latin.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-cyrillic-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-cyrillic.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-greek-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-greek.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-latin-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-italic-latin.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-cyrillic-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-cyrillic.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-greek-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-greek.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-latin-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-mono-normal-latin.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-cyrillic-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-cyrillic.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-greek-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-greek.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-latin-ext.woff2 create mode 100644 public/fonts/ubuntu-sans-normal-latin.woff2 create mode 100644 src/bridge/typography-fonts.test.ts create mode 100644 src/bridge/typography-fonts.ts diff --git a/index.html b/index.html index 0e17658..8062be8 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,10 @@ /> ZenNotes + +