Skip to content

VietSVG v0.3.0

Latest

Choose a tag to compare

@Konoha95 Konoha95 released this 06 Dec 07:15
· 1 commit to main since this release
5e65887

VietSVG v0.3.0 — Gemini backend removed, deep-review fixes

Removed:

  • The Gemini proofreader backend (--gemini-proofread, added in 0.2.0). It never passed live verification — the provider returned overload errors throughout testing — so the proofreader now focuses on the Grok backend (--grok-proofread), which shares the same conservative prompt and parser.

Fixed (from a deep code review; every item reproduced before fixing):

  • Transforms use full matrix math (rotate/skew included): rotated artwork is no longer clipped by the crop.
  • Arc bounds use the rotated ellipse box instead of unrotated radii around the chord midpoint.
  • Malformed path data (truncated coordinates) reports instead of crashing.
  • Fixes are applied to parsed text nodes: XML-escaped text matches, &/< in replacements stay valid, attributes and comments are untouched, and a word stored in both NFC and NFD is corrected everywhere.
  • The root viewBox is set on the parsed root — single-quoted, absent, and comment-shadowed attributes all handled.
  • Sub-unit canvases keep positive viewBox dimensions instead of rounding to 0 0 0 0.
  • OCR comparison treats tone-placement variants (hòa/hoà) as equivalent; real tone differences still flag.
  • DTD entity declarations are rejected (expansion risk).
  • --grok-proofread sends only flagged strings to the API.
  • Browser demo: SVG-derived text is escaped before rendering, active content is stripped before preview, and its crop/fix logic mirrors the Python fixes.

Test suite: 33 tests. Install: pip install -U vietsvg