mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
feat(reader): increase font file size limit to 50MB for CJK fonts
Increase MAX_FONT_FILE_SIZE to 50MB to support large CJK and non-alphabetic fonts. Implement a lightweight binary font metadata parser to replace opentype.js buffer parsing, and update reader custom font composables to lazily manage blob URLs per font family. Closes #793
This commit is contained in:
@@ -42,7 +42,9 @@ export const FONT_FORMAT_CSS_FORMAT: Record<FontFormat, string> = {
|
||||
woff2: "woff2",
|
||||
};
|
||||
|
||||
export const MAX_FONT_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
|
||||
// Sized for CJK and other non-alphabetic fonts, which routinely exceed 30 MB because
|
||||
// they carry tens of thousands of glyphs.
|
||||
export const MAX_FONT_FILE_SIZE = 50 * 1024 * 1024; // 50 MB
|
||||
export const MAX_FONTS_PER_USER = 50;
|
||||
|
||||
export const FONT_WEIGHTS = [100, 200, 300, 400, 500, 600, 700, 800, 900] as const;
|
||||
|
||||
Reference in New Issue
Block a user