Fixed bug [Bug] <Error MIME al cargar fuente “Arial” desde Google Fonts en exportaciones públicas>

Fixes #2435
This commit is contained in:
sahil
2025-11-05 16:33:56 +05:30
parent b49798950a
commit 2585c47de8
2 changed files with 35 additions and 0 deletions

View File

@ -6,7 +6,18 @@ export type Font = {
files: Record<string, string>;
};
/**
* Known system fonts we consider available locally without fetching from Google Fonts.
* Extend this list when adding more system-safe families to the app.
*/
export const localFonts = ["Arial", "Cambria", "Garamond", "Times New Roman"];
/**
* Checks whether a font family is a local/system font.
*
* Input: font family name (case-insensitive)
* Output: true if present in localFonts, otherwise false
*/
export const isLocalFont = (family: string): boolean =>
localFonts.some((f) => f.toLowerCase() === family.toLowerCase());