feat: add Fixel font support

Adds Fixel Text as a new UI font option
Allows font sources to load from direct URLs
Keeps existing fontsource-based loading working
This commit is contained in:
Bohdan Triapitsyn
2026-09-03 11:49:35 +03:00
parent 0107abb32d
commit 76128b615f
2 changed files with 32 additions and 4 deletions
+4
View File
@@ -4,6 +4,10 @@ const loadedFaces = new Set<string>();
const pendingFaces = new Map<string, Promise<void>>();
const buildFontUrl = (source: FontFaceSource, weight: number) => {
if ('urls' in source) {
return source.urls[weight];
}
const packageName = encodeURIComponent(source.packageName).replace('%40', '@').replace('%2F', '/');
return `https://cdn.jsdelivr.net/npm/${packageName}/files/${source.filePrefix}-latin-${weight}-normal.woff2`;
};