From 60c1b8baf8f810177d6cfd98b30fedda02096956 Mon Sep 17 00:00:00 2001 From: Rn86222 Date: Thu, 19 Nov 2026 22:10:43 +0900 Subject: [PATCH 1/2] fix: put the Japanese font first while the interface is in Japanese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chrome drew some characters, such as 方 and 生 in the first stage's goal, with a system font instead of Noto Sans JP. A font split into unicode ranges is missed for some characters when the fonts before it lack them; with Noto Sans JP first, every character comes from it. Latin letters in the Japanese interface now use Noto Sans JP's own, and the English interface is unchanged. Co-Authored-By: Claude Opus 5.5 --- src/style.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/style.css b/src/style.css index 21b04c7..f84e3d6 100644 --- a/src/style.css +++ b/src/style.css @@ -25,6 +25,13 @@ --color-tutorial-background: #fff3e0; } +/* Chrome misses some characters of a font split into ranges when it is not the first */ +:root:lang(ja) { + --font-family: + "Noto Sans JP", "Roboto", "Helvetica", "Arial", "Hiragino Sans", + "Yu Gothic UI", Meiryo, sans-serif; +} + :root, body, #root { From 35ba0f6aa5ef4c58a64cef7e464c272e1fd16f3f Mon Sep 17 00:00:00 2001 From: Rn86222 Date: Thu, 19 Nov 2026 22:13:09 +0900 Subject: [PATCH 2/2] refactor: name the Latin and Japanese font lists once Both orders are built from the same two lists, and the comment names the actual trigger: an installed font before the split one. Co-Authored-By: Claude Opus 5.5 --- src/style.css | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/style.css b/src/style.css index f84e3d6..4c3f224 100644 --- a/src/style.css +++ b/src/style.css @@ -5,10 +5,9 @@ } :root { - /* MUI's default Latin fonts first, then Japanese */ - --font-family: - "Roboto", "Helvetica", "Arial", "Noto Sans JP", "Hiragino Sans", - "Yu Gothic UI", Meiryo, sans-serif; + --latin-fonts: "Roboto", "Helvetica", "Arial"; + --japanese-fonts: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo; + --font-family: var(--latin-fonts), var(--japanese-fonts), sans-serif; font-family: var(--font-family); /* Keep in sync with the colors in style.ts */ @@ -25,11 +24,9 @@ --color-tutorial-background: #fff3e0; } -/* Chrome misses some characters of a font split into ranges when it is not the first */ +/* Chrome skips some characters of a split font placed after an installed one */ :root:lang(ja) { - --font-family: - "Noto Sans JP", "Roboto", "Helvetica", "Arial", "Hiragino Sans", - "Yu Gothic UI", Meiryo, sans-serif; + --font-family: var(--japanese-fonts), var(--latin-fonts), sans-serif; } :root,