Fix issue where you could want up without the official Even font extracted, if you skipped onboarding

This commit is contained in:
James Babcock committed 2026-08-30 20:38:14 -07:00
1 parent 54005ae95a
commit 8a86cf28e1
6 files changed
+134 -8

No files matched your search

+5
View File
@@ -20,6 +20,7 @@ import {
} from "./firmware-fonts";
import { fetchWithUserAgent } from "../util/http";
import { bytesToHex, hexToBytes as hexToBytesLenient } from "../util/hex-util";
import { EvenHubFont } from "../graphics/evenhub-font";
declare const com: any;
@@ -180,6 +181,10 @@ function persistEvenHubFonts(base: ArrayBuffer): void {
},
);
if (writeError) throw writeError;
// A degraded EvenHubFont (built before this extraction existed) is cached
// per JS context; drop it so the next render picks up the real fonts
// without an app restart.
EvenHubFont.invalidate();
} catch (error) {
throw new FirmwareBuildError(
`The firmware was verified, but its EvenHub fonts could not be extracted: ${(error as Error)?.message ?? error}`,