28 Commits
Author SHA1 Message Date
YuFeng d20d21f2f0 新增字体文件 2026-03-08 02:32:37 +08:00
McoyRT d556b1c784 Merge pull request #3 from Corgiking0127/copilot/fix-apng-font-issue
Fix APNG output format, font rendering for PNG generation, increase animation frame rate, and bundle fonts locally
2026-03-08 01:58:53 +08:00
copilot-swe-agent[bot]andCorgiking0127 3c198cbdbc feat: bundle fonts locally for reliable SVG embedding in GitHub README
- 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>
2026-03-07 17:34:28 +00:00
YuFeng 3c65aecd98 优化 2026-03-08 01:12:25 +08:00
YuFeng 0e024dbb55 Merge branch 'main' of github:Corgiking0127/readme-signature-generate 2026-03-08 01:05:44 +08:00
YuFeng 271c2b250a chore 2026-03-08 01:05:36 +08:00
copilot-swe-agent[bot]andCorgiking0127 0ae5e0a85c fix: fetch TTF fonts for Resvg (fontdb lacks woff2 support), increase fps to 30, pre-load font via FontFace API
- 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>
2026-03-07 16:24:26 +00:00
copilot-swe-agent[bot]andCorgiking0127 33fca8efde fix: change APNG output to PNG format and fix font loading
- 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>
2026-03-07 15:59:39 +00:00
copilot-swe-agent[bot] 35d117a029 Initial plan 2026-03-07 15:52:28 +00:00
McoyRT 81a249863c Merge pull request #2 from Corgiking0127/copilot/fix-svg-font-display-issue
Fix SVG font display and add APNG animated image format support
2026-03-07 23:32:59 +08:00
copilot-swe-agent[bot]andCorgiking0127 590be4f50f Add comments for magic numbers in APNG frame generation
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
2026-03-07 15:30:21 +00:00
copilot-swe-agent[bot]andCorgiking0127 136e0dfc89 Add APNG format support for animated signature export
- Backend: Add cubic bezier solver, static frame generator, PNG parser,
  CRC32, and APNG encoder for server-side APNG generation via format=apng
- Backend: Cache raw font buffer for resvg rendering with custom fonts
- Frontend: Add format selector UI (SVG / APNG buttons) in download tab
- Frontend: Add browser-based APNG encoder using Canvas API
- Frontend: Add progress indicator during APNG frame generation
- Frontend: Update API URLs section with APNG Animation URL
- Add package.json with @resvg/resvg-js dependency
- Add .gitignore to exclude node_modules

Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
2026-03-07 15:29:20 +00:00
copilot-swe-agent[bot]andCorgiking0127 9ee25317fa Rename fStyle to fontStyle for consistent naming
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
2026-03-07 07:41:09 +00:00
copilot-swe-agent[bot]andCorgiking0127 f7d52f26dc Fix SVG font display in editors and GitHub by improving font embedding
- 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>
2026-03-07 07:40:18 +00:00
copilot-swe-agent[bot] e07fdd7dee Initial plan 2026-03-07 07:30:57 +00:00
YuFeng f3c44f34af Merge branch 'main' of github:Corgiking0127/readme-signature-generate 2026-03-07 15:27:00 +08:00
YuFeng b4d875495a merged 2026-03-07 15:19:26 +08:00
McoyRT 94b0034449 Merge pull request #1 from Corgiking0127/copilot/fix-svg-font-issue
[WIP] Fix SVG font inconsistency in editor and browser
2026-03-07 15:16:31 +08:00
copilot-swe-agent[bot]andCorgiking0127 317a9efb4f Fix SVG font inconsistency and wave animation timing desync
Co-authored-by: Corgiking0127 <54504179+Corgiking0127@users.noreply.github.com>
2026-03-07 07:16:16 +00:00
copilot-swe-agent[bot] 04a6253561 Initial plan 2026-03-07 07:07:31 +00:00
YuFeng 0d8907f213 更新 README 文件中的签名预览图,使用本地 SVG 文件替代 API 链接;新增签名 SVG 文件 2026-03-07 15:02:42 +08:00
YuFeng 96b2f53436 更新 README 文件,添加签名预览图;删除不再使用的签名 API 服务器代码 2026-03-07 14:58:18 +08:00
YuFeng 05f884c0f4 chore 2026-03-07 14:54:37 +08:00
YuFeng c8dbc270f2 优化 2026-03-07 14:49:47 +08:00
YuFeng c7c4c210a4 init readme.md 2026-03-07 13:14:43 +08:00
YuFeng 0ca23e82a0 inti 2026-03-07 12:39:54 +08:00
McoyRT a49b006205 Add files via upload 2026-03-07 02:42:37 +08:00
McoyRT 2cd5f3fb63 Initial commit 2026-03-07 02:34:32 +08:00