Repository navigation
Commit 09e6ce1
authored
fix: bundle and fallback to Noto Sans CJK for missing Chinese glyphs (#2182)
## Summary
Flutter has a known issue on ARM64 Linux platforms
(flutter/flutter#90951) where Chinese glyphs fail to render and display
as tofu boxes (`□□□`). Within snap confinement, the application lacks
access to necessary CJK glyph tables, causing unrendered characters
across the interface.
Ahead of an upstream release for the Lenovo partnership, this provides a
workaround in App Center by bundling the fonts and declaring explicit
fallbacks.
## Changes
**Add Noto Sans CJK to font fallbacks** — In
`packages/app_center/lib/store/store_app.dart` (inside
`StoreAppThemeX`), added `Noto Sans CJK (SC, TC, HK)` to
`fontFamilyFallback`.
**Stage CJK fonts in the snap** — Added `fonts-noto-cjk` to
`stage-packages` in `snapcraft.yaml` so the required font files are
bundled and accessible inside snap confinement at runtime.
## Testing
Manual verification on ARM64 hardware:
1. Build and install the snap on an ARM64 test machine.
2. Launch App Center with a Chinese locale (`LANG=zh_CN.UTF-8`).
3. Verify that Chinese glyphs render properly across all views without
tofu boxes (□□□).
---
UDENG-112622 files changed
Lines changed: 39 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 96 | + | |
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| |||
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 174 | + | |
180 | 175 | | |
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
184 | 179 | | |
185 | 180 | | |
186 | | - | |
187 | | - | |
188 | | - | |
| 181 | + | |
189 | 182 | | |
190 | 183 | | |
191 | 184 | | |
192 | 185 | | |
193 | 186 | | |
194 | 187 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 188 | + | |
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
| |||
216 | 207 | | |
217 | 208 | | |
218 | 209 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 210 | + | |
| 211 | + | |
223 | 212 | | |
224 | 213 | | |
225 | 214 | | |
| |||
257 | 246 | | |
258 | 247 | | |
259 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
260 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
261 | 280 | | |
262 | 281 | | |
263 | 282 | | |
264 | 283 | | |
265 | 284 | | |
266 | 285 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 286 | + | |
270 | 287 | | |
271 | 288 | | |
272 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
0 commit comments