From 20cf96bbd955387800733b987d14df6d7a06ea0f Mon Sep 17 00:00:00 2001 From: Dorian Gironde Date: Sun, 19 Apr 2026 14:01:19 +0200 Subject: [PATCH] fix(lyrics): force Japanese font shaping for am-lyrics component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes kanji characters like 刀 rendering as simplified Chinese instead of Japanese when displayed in lyrics. The root cause is the document lang="en" attribute causing the browser to use English font shaping. Added font-language-override: 'JA' to am-lyrics elements so the browser treats lyric text as Japanese regardless of the page's lang attribute. Applied to both side panel and fullscreen lyrics views. --- styles.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/styles.css b/styles.css index 8f2f61e..1e7c23c 100644 --- a/styles.css +++ b/styles.css @@ -5698,6 +5698,11 @@ input:checked + .slider::before { container-name: sidepanel; } +/* Force Japanese font shaping so kanji like 刀 render as Japanese glyphs, not simplified Chinese */ +am-lyrics { + font-language-override: 'JA'; +} + @container sidepanel (min-width: 500px) { .panel-content am-lyrics { --lyplus-font-size-base: 36px; @@ -10982,6 +10987,9 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { 'Noto Sans Malayalam', 'Noto Sans Sinhala', 'Noto Sans Khmer', 'Noto Sans Lao', 'Noto Sans Myanmar', 'Noto Sans Georgian', 'Noto Sans Armenian', 'Noto Sans Ethiopic', system-ui, sans-serif; + /* Force Japanese font shaping so kanji like 刀 render as Japanese, not simplified Chinese */ + font-language-override: 'JA'; + --lyplus-font-size-base: clamp(34px, 3vw, 52px); --lyplus-padding-line: 8px; --lyplus-text-color: rgb(246, 244, 239, 0.08);