Просмотр исходного кода

Prefer OS-bundled Japanese fonts when UI language is Japanese (#9002)

Add a :lang(ja)-scoped font-family in the shared frss.css so kanji/kana
render with Japanese glyphs on Japanese UIs, without affecting Chinese
(zh-CN/zh-TW) users. Revives the intent of PR #5671 with a
cross-platform font list. frss.rtl.css is regenerated via rtlcss.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Jam Balaya 22 часов назад
Родитель
Сommit
3d04c8ef49
2 измененных файлов с 12 добавлено и 0 удалено
  1. 6 0
      p/themes/base-theme/frss.css
  2. 6 0
      p/themes/base-theme/frss.rtl.css

+ 6 - 0
p/themes/base-theme/frss.css

@@ -64,6 +64,12 @@ html, body {
 	font-size: 100%;
 }
 
+html:lang(ja) body {
+	font-family: "OpenSans", "Cantarell", "Helvetica", "Arial",
+		"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
+		"Osaka", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
+}
+
 button, input, select, textarea {
 	font-family: inherit;
 }

+ 6 - 0
p/themes/base-theme/frss.rtl.css

@@ -64,6 +64,12 @@ html, body {
 	font-size: 100%;
 }
 
+html:lang(ja) body {
+	font-family: "OpenSans", "Cantarell", "Helvetica", "Arial",
+		"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
+		"Osaka", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
+}
+
 button, input, select, textarea {
 	font-family: inherit;
 }