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:
@@ -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`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user