From ad8fea51d2d48ff55561085c5b19d650052f5d77 Mon Sep 17 00:00:00 2001 From: Momentum96 Date: Tue, 13 Oct 2026 19:27:56 +0900 Subject: [PATCH] ui: admit stock macOS CJK faces as interface fallbacks (#101) The 48 MB cap on borrowed UI faces rejected macOS's only Hangul face (AppleSDGothicNeo.ttc, ~55 MB) and the picked Simplified Chinese face (PingFang.ttc, ~78 MB), so Korean and Chinese text in the title, recent files and notes drew as boxes. Raise the cap to 128 MB, as in PhotoCraft. --- contributors/people.toml | 3 +++ crates/ui-egui/src/uifonts.rs | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contributors/people.toml b/contributors/people.toml index c10fb209..2905c49c 100644 --- a/contributors/people.toml +++ b/contributors/people.toml @@ -41,3 +41,6 @@ sync_github_name = true [people.Silvertree2010] display_name = "Netter" sync_github_name = false + +[people.Momentum96] +sync_github_name = true diff --git a/crates/ui-egui/src/uifonts.rs b/crates/ui-egui/src/uifonts.rs index 50ebc87b..4672cbe0 100644 --- a/crates/ui-egui/src/uifonts.rs +++ b/crates/ui-egui/src/uifonts.rs @@ -14,8 +14,10 @@ use std::sync::Arc; use deckcraft_fonts::{FontDb, FontFace}; -/// Faces larger than this are left out (egui keeps a copy of each face it is given). -const MAX_FACE_BYTES: usize = 48 << 20; +/// Faces larger than this are left out (egui keeps a copy of each face it is given). Large enough +/// for the stock macOS CJK collections the font database picks: `AppleSDGothicNeo.ttc` (about +/// 55 MB, the only Hangul face) and `PingFang.ttc` (about 78 MB, Simplified Chinese). +const MAX_FACE_BYTES: usize = 128 << 20; /// Faces borrowed for the interface, and the characters already looked at. #[derive(Default)]