- Add fonts/ directory for bundled woff2/ttf font files
- Add scripts/download-fonts.js to download all 8 fonts from Google Fonts
- loadFont() now reads from local fonts/ first, falls back to runtime fetch
- Extract _fontFaceCSS() helper supporting both woff2 and truetype formats
- Resolve FONTS_DIR via __dirname and process.cwd() for Vercel compatibility
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
- Root cause: Resvg's fontdb does NOT support woff2 format, so woff2 fonts
were silently ignored. Now fetches TTF from Google Fonts (using basic UA)
alongside woff2 (for SVG embedding).
- Enable loadSystemFonts:true as fallback for Resvg
- Increase frame rate from 20fps/60max to 30fps/90max for smoother animation
- Pre-load font via FontFace API in client-side APNG for reliable rendering
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
- Change Content-Type from image/apng to image/png (server)
- Change Blob type from image/apng to image/png (client)
- Change download extension from .apng to .png (client)
- Update User-Agent to proper Chrome UA so Google Fonts returns woff2
- Set Resvg defaultFontFamily to actual font family instead of "serif"
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
- Fix backend loadFont retry logic: previously, if font loading failed once,
the @import fallback was cached permanently and never retried; now the
function retries on subsequent requests until embedding succeeds
- Fix frontend @font-face declaration to include font-style and font-weight
properties for proper font matching in strict SVG renderers
- Add weight and fStyle properties to frontend FONTS array
- Add font-weight and font-style attributes to frontend SVG text element
(matching backend behavior) for consistent rendering
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>