Skip to content

Improve PAGX SVG export coverage and add shared modifier resolver utilities.#3427

Open
OnionsYu wants to merge 208 commits into
Tencent:mainfrom
OnionsYu:feature/onionsyu_export_svg2
Open

Improve PAGX SVG export coverage and add shared modifier resolver utilities.#3427
OnionsYu wants to merge 208 commits into
Tencent:mainfrom
OnionsYu:feature/onionsyu_export_svg2

Conversation

@OnionsYu
Copy link
Copy Markdown
Contributor

完善 PAGX 的 SVG 导出能力,并抽取多个导出器共享的辅助模块。

主要变更

  • SVG 导出器增强:修复垂直文本布局、textAlign End 与 overflow hidden 的换行行为,支持 textLength/lengthAdjust 让非末尾列填满容器;按布局解析的缩放对齐 PAGX 渲染器,正确处理 RTL 段落与字形 run;将 bold/italic 字体样式编码进 font-family,便于浏览器与 CoreText 解析正确字面。
  • ImagePattern:仅有 filePath 时跳过 bake 路径并内联图像字节,正确处理 Decal 等 scaleMode;修复 fitsToGeometry 坐标空间下的渐变导出。
  • 新增 SVGFeatureProbe,用于检测目标渲染器对 SVG 特性的支持情况。
  • 抽取 ExporterUtils 与 ModifierResolver 作为 SVG/PPT 导出器共享的工具与修饰符求解层,去重原本散落在两个导出器中的逻辑。
  • TextLayout 调整以配合上述共享工具的接口。
  • 新增 PAGXSVGTest 覆盖上述新增/修复行为。

不影响 PPT 导出的对外行为,PPTWriter.h 的清理仅为同步共享头的迁移。

OnionsYu added 30 commits April 2, 2026 10:28
…tch when tileModeX or tileModeY is Repeat or Mirror.
OnionsYu added 18 commits May 9, 2026 13:21
…ort so PowerPoint stops compounding faux-bold on top of an already bold face.
…nfig-based renderers resolve the family correctly.
…ks, modifier edges, and text alignment paths.
…ort_svg2

# Conflicts:
#	src/pagx/ppt/PPTExporter.cpp   resolved by feature/onionsyu_export_ppt2 version
…oving the duplicated ApplyStrokeBoxInset definition.
…resolved scales RTL paragraphs and glyph runs.
…on that misuses baselineY as a Y coordinate.
…d column so wrapping textAlign End and overflow hidden render correctly.
…t spacing so non-last columns stretch to fill the box like the PAGX renderer.
…o browsers and CoreText viewers use the real bold face.
…rt_svg2

# Conflicts:
#	.codebuddy/skills/pagx/references/cli.md
#	CMakeLists.txt
#	include/pagx/PPTExporter.h
#	include/pagx/SVGExporter.h
#	src/cli/CommandExport.cpp
#	src/pagx/TextLayout.cpp
#	src/pagx/TextLayout.h
#	src/pagx/ppt/PPTExporter.cpp
#	src/pagx/ppt/PPTFeatureProbe.h
#	src/pagx/ppt/PPTStyleEmitter.cpp
#	src/pagx/ppt/PPTTextWriter.cpp
#	src/pagx/ppt/PPTWriter.h
#	src/pagx/svg/SVGExporter.cpp
#	src/pagx/utils/ExporterUtils.cpp
#	src/pagx/utils/ExporterUtils.h
#	test/src/PAGXCliTest.cpp
#	test/src/PAGXPPTTest.cpp
OnionsYu added 5 commits May 13, 2026 11:33
…tting CSS Compositing Level 2 mix-blend-mode values and guarding feBlend against the unsupported Porter-Duff modes.
…ss SVG and PPT exporters to remove mirrored implementations.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

❌ Patch coverage is 96.38187% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.17%. Comparing base (2973416) to head (e83d4a0).

Files with missing lines Patch % Lines
src/pagx/utils/ModifierResolver.cpp 90.35% 18 Missing and 12 partials ⚠️
src/pagx/utils/ExporterUtils.cpp 74.35% 19 Missing and 1 partial ⚠️
src/pagx/utils/ExporterUtils.h 73.52% 9 Missing and 9 partials ⚠️
src/pagx/PAGXOptimizer.cpp 42.10% 4 Missing and 7 partials ⚠️
src/pagx/ppt/PPTTextWriter.cpp 92.59% 2 Missing ⚠️
src/pagx/svg/SVGBlendMode.h 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3427      +/-   ##
==========================================
+ Coverage   81.55%   82.17%   +0.62%     
==========================================
  Files         558      562       +4     
  Lines       51407    54164    +2757     
  Branches    13875    14371     +496     
==========================================
+ Hits        41924    44511    +2587     
- Misses       6603     6706     +103     
- Partials     2880     2947      +67     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants