Skip to content

feat: 支持文字 letter-spacing、line-height 导出及多段落换行 - #3

Merged
random-yang merged 2 commits into
mainfrom
feat/text-letter-spacing-line-height
Feb 26, 2026
Merged

random-yang merged 2 commits into
mainfrom
feat/text-letter-spacing-line-height

Conversation

@random-yang

@random-yang random-yang commented Feb 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 提取并导出 SVG 文字的 letter-spacing → PSD tracking,line-height → PSD leading
  • 修复 <foreignObject> 中多个 <p> / <br> 的换行符丢失问题,使用 PSD 标准 \r 换行
  • 将 line-height 加入 style-resolver 可继承属性集合

Test plan

  • 新增 11 个单元测试覆盖 letter-spacing、line-height 提取与输出
  • 新增多段落换行符提取测试(<p> 和 <br>)
  • 全部 155 个测试通过,无回归
  • 在 Photoshop/Affinity 中打开 PSD 验证字间距、行高、换行显示

🤖 Generated with Claude Code

random-yang and others added 2 commits February 25, 2026 22:34
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
svg2psd Building Building Preview, Comment Feb 26, 2026 6:44am

@random-yang
random-yang merged commit d3af5cd into main Feb 26, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — ac387837 Deployed Feb 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant