1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/* ============================================================
* rustio-admin / base / typography (international scripts)
*
* Five script families layered on top of the Latin + Arabic
* base in base/typography.css. Two delivery tiers:
*
* 1. Auto-loaded via `unicode-range` (no `lang` tag needed)
* - Thai → Noto Sans Thai
* - Devanagari → Noto Sans Devanagari
* These scripts occupy non-colliding code-point ranges, so
* the browser fetches the file only when the page actually
* renders Thai / Devanagari glyphs. They sit in
* `--rio-font-sans` so untagged Thai / Devanagari content
* (patron names, free-text fields) renders correctly.
*
* 2. Locale-gated via `:lang(ja|ko|zh)` (Han Unification)
* - Japanese → Noto Sans JP
* - Korean → Noto Sans KR
* - Simpl. Chinese → Noto Sans SC
* U+4E00-9FFF (CJK Unified Ideographs) is shared between
* Japanese Kanji, Simplified Hanzi, and Traditional Hanzi —
* same code points, different glyphs. A naive global
* fallback would render Japanese names with Chinese shapes
* (or vice versa). Selecting via `:lang()` matches the
* closest declared ancestor language, so nested mixed-script
* content (e.g. an `<en-default>` page with a `<span lang="ja">`)
* shapes correctly per region.
*
* CJK uses one static-Regular woff2 per language (browsers
* synthesise bold). Variable CJK fonts ship as 100+ subset files
* per language; the framework's per-file route registration makes
* that impractical without a build-script generator. Static-400
* covers full JIS Level 1+2 (JP), common Hangul + Hanja (KR), and
* GB2312-level Hanzi (SC) in a single download.
*
* Layered AFTER base/typography.css so :lang() rules override the
* Arabic block where nesting overlaps.
* ============================================================ */
/* ---- @font-face: Thai (auto-loaded) -------------------------- */
/* ---- @font-face: Devanagari (auto-loaded) -------------------- */
/* ---- @font-face: Japanese (locale-gated) --------------------- *
* Hiragana + Katakana + CJK Unified Ideographs (Japanese shapes) +
* Halfwidth Forms. The unicode-range filter prevents Latin-only
* pages from fetching the ~1 MB woff2. */
/* ---- @font-face: Korean (locale-gated) ----------------------- *
* Hangul Jamo + Compatibility Jamo + Hangul Syllables + Jamo
* Extended A/B + CJK Unified (Hanja in Korean shapes) +
* Halfwidth Forms. */
/* ---- @font-face: Simplified Chinese (locale-gated) ----------- *
* CJK Unified Ideographs (Simplified shapes) + common Chinese
* punctuation + Halfwidth Forms. Note: collides with the JP
* unicode-range on U+4E00-9FFF — disambiguation happens via
* `:lang()` below, not unicode-range. */
/* ---- Locale-gated CJK font-family application ---------------- *
*
* `:lang()` matches the closest declared language on or above the
* element. Nested mixed-script content honours the inner lang
* (e.g. a Japanese-default page with `<span lang="zh">` renders
* the span in Simplified Chinese shapes).
*
* No `:lang(X) *` descendant selectors — children with their own
* `lang` attribute take over via the same `:lang()` rules, which
* is the correct cascade for multilingual admin content. Children
* without an explicit `lang` inherit through normal CSS.
*
* Latin numerals + ASCII punctuation inside a `:lang(ja|ko|zh)`
* block fall through to the same `font-family` chain — Noto Sans
* JP/KR/SC include matching Latin shapes designed to harmonise
* with the CJK glyphs, so mixed-script lines stay visually even.
*/
}
}
}
/* ---- Explicit utility classes --------------------------------*
* For surfaces that need to pin a script's family regardless of
* the page's `lang` attribute. Useful for example for a sidebar
* label that always reads in Japanese, or an Arabic display
* heading that wants Tajawal's geometric style instead of Naskh.
*/
}
}
}
}
}
/* Tajawal display variant for selective Arabic accents (badges,
* marketing headers, callouts). The framework's default Arabic
* face is now Noto Naskh; this utility opts back into Tajawal's
* geometric style where it suits the design. */
}