Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.2.1
Name Modified Size InfoDownloads / Week
Parent folder
5.2.1_ WordArt WYSIWYG Freeform Resizing _ Canvas-to-Print Parity source code.tar.gz 2026-10-02 22.4 MB
5.2.1_ WordArt WYSIWYG Freeform Resizing _ Canvas-to-Print Parity source code.zip 2026-10-02 22.6 MB
README.md 2026-10-02 8.2 kB
OpenPublisher-5-x86_64.AppImage 2026-10-02 166.4 MB
openpublisher5_amd64-windows-portable.exe 2026-10-02 183.2 MB
openpublisher5_amd64-windows.exe 2026-10-02 165.2 MB
openpublisher5_amd64-macos.dmg 2026-10-02 233.1 MB
openpublisher5_amd64-linux.run 2026-10-02 193.4 MB
openpublisher5_amd64-linux.rpm 2026-10-02 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-10-02 153.6 MB
openpublisher5_amd64-linux.deb 2026-10-02 156.2 MB
openpublisher5_amd64-freebsd.pkg 2026-10-02 185.5 MB
Totals: 12 Items   1.7 GB 0

πŸš€ Summary

Version 5.2.1 resolves a visual discrepancy where resizing a WordArt element on the editor canvas kept the text constrained to its original aspect ratio (leaving empty gaps and detached resize handles), while the print engine stretched the text to fill the bounding box.

This release establishes full WYSIWYG ("What You See Is What You Get") parity between the canvas workspace and print spooler: WordArt now stretches dynamically to fill its bounding box in real time as resize handles are moved, eliminating detached handles and empty padding. For designers who prefer proportional scaling, holding the Shift key during corner resize (or checking Lock Aspect Ratio in Picture Tools) constrains the element to its exact proportions.

In addition, version 5.2.1 updates cachebusters across all application components, updates the Service Worker cache (open-publisher-v5-2-1), refreshes PWA registration, and updates dashboard template fetching.


πŸ” Root Cause Analysis

Investigation into the editor rendering and print pipeline revealed the exact cause of the divergence:

  1. Editor Canvas object-fit: contain Constraint: In elements/wordart/beta-wordart.js, the generated WordArt <img> element was instantiated with inline CSS: html <img class="beta-wa-img" ... style="width:100%; height:100%; object-fit:contain; position:absolute; top:0; left:0;"> When the user dragged the bottom or top handle to make the box taller, the .pub-element wrapper expanded, but object-fit: contain prevented the browser from scaling the text vertically. Instead, the image was letterboxed inside the container, leaving large empty gaps above and below the letters, with the selection handles floating far away from the text.

  2. Print Engine Default Fill Layout: In extensions/print-engine.js, the print spooler executes isDefaultFillImageLayout(), which detects that the element image style has width: 100% and height: 100%. The print engine draws the image onto rasterCanvas using rasterCtx.drawImage(tempImg, 0, 0, rasterCanvas.width, rasterCanvas.height), scaling the image to fill the entire physical bounding box.

  3. WYSIWYG Break: The canvas editor was visually enforcing contain, but the print output was rendering fill. This produced an unexpected result where the user saw unstretched text on screen, but a tall stretched printout on paper and PDF.


πŸ“Š Desktop Publisher Analysis & Decision

Why Freeform Stretch (object-fit: fill) is the Better Desktop Publishing Choice:

  1. Intentional Geometric Shaping: In classic desktop publishing (Microsoft Publisher, InDesign, QuarkXPress), WordArt is fundamentally distinct from photos or body text. WordArt is graphic display typography intended to be stretched, expanded, or condensed to fit headlines, vertical spines, banners, and decorative headers. When a user drags a top or bottom handle down, their explicit design intent is to make the headline taller.

  2. Elimination of Dead Space & Floating Handles: With object-fit: contain, the bounding box and resize handles become detached from the visual text (floating 100px to 200px away). This impairs alignment, snapping to guides, and element selection. With object-fit: fill, the selection rectangle and handles always tightly encapsulate the WordArt glyphs.

  3. Consistency with Open Publisher Graphics: All other graphic engines in Open Publisher (Smart Images, Drawing Engine, Clipart) utilize object-fit: fill within .element-content containers for responsive frame-bound scaling.

  4. Proportional Scaling Retained via Corner Drag: When proportional scaling without distortion is desired, designers simply hold the Shift key while dragging corner handles, or enable Lock Aspect Ratio in the Picture Tools ribbon.


πŸ› οΈ Fixes & Implementation Details

1. WordArt Insertion & Update Normalization (elements/wordart/beta-wordart.js)

  • Updated the insertion template in beta-wordart.js from object-fit:contain; to object-fit:fill;: html <img class="beta-wa-img" data-beta-wa-text="${safeStr}" data-beta-wa-style="${styleId}" src="${finalImgData}" draggable="false" style="width:100%; height:100%; object-fit:fill; position:absolute; top:0; left:0;">
  • Ensured that when editing existing WordArt elements (editTarget), img.style.objectFit = 'fill' is explicitly maintained.

2. Global CSS Rule for Visual Parity (style.css)

  • Added .beta-wa-img ruleset to style.css to ensure all existing publications and newly loaded documents render with object-fit: fill !important;: css .beta-wa-img { width: 100% !important; height: 100% !important; object-fit: fill !important; position: absolute; top: 0; left: 0; }

3. Shift-Key & Aspect Lock Proportional Corner Resizing (canvas/interaction-mouse.js)

  • Enhanced the resize branch in canvas/interaction-mouse.js. When a user drags any corner handle (nw, ne, se, sw) while holding the Shift key OR while data-aspect-lock === 'true', the engine locks the width and height proportionally: javascript const isAspectLocked = e.shiftKey || (state.selectedEl && state.selectedEl.getAttribute('data-aspect-lock') === 'true'); const isCorner = d.dir === 'nw' || d.dir === 'ne' || d.dir === 'se' || d.dir === 'sw'; if (isAspectLocked && isCorner && d.w > 0 && d.h > 0) { const aspect = d.w / d.h; if (Math.abs(dx) > Math.abs(dy)) { const targetH = rawW / aspect; if (d.dir.includes('n')) newT = d.t + (d.h - targetH); rawH = targetH; } else { const targetW = rawH * aspect; if (d.dir.includes('w')) newL = d.l + (d.w - targetW); rawW = targetW; } }

4. Cache & Version Synchronization

  • Synchronized version string across cachebusters, service workers, PWA install engine, and dashboard templates.

πŸ§ͺ Verification & Automated Testing

All updates were validated with an automated Playwright test suite (test_wordart_v521.py):

Test / Check Target Result Details
Editor CSS Rule Validation .beta-wa-img computed style Passed Computed objectFit is fill
Real-Time Canvas Stretching Drag vertical handle Passed Rendered image height expands to match parent element box (325px x 325px)
Print Spooler DOM Parity beforeprint event pipeline Passed Print image objectFit is fill, matching dimensions (1361px x 325px)
Proportional Corner Resizing Shift + corner drag (rh-se) Passed Aspect ratio strictly preserved (start: 4.188, end: 4.188)
JavaScript Console Health Browser runtime Passed 0 JavaScript errors or unhandled exceptions

βœ… Checklist Completed

  • [x] elements/wordart/beta-wordart.js: Updated .beta-wa-img insertion template from object-fit:contain; to object-fit:fill;, and ensured editTarget maintains objectFit = 'fill'.
  • [x] style.css: Added .beta-wa-img ruleset with object-fit: fill !important; to ensure consistent rendering across new and saved publications.
  • [x] canvas/interaction-mouse.js: Added proportional corner drag constraint when holding the Shift key or when data-aspect-lock is enabled.
  • [x] index.html: Bumped all 78 script, stylesheet, and asset cachebusters from ?v=5.2.0 to ?v=5.2.1.
  • [x] sw.js: Bumped Service Worker cache name to open-publisher-v5-2-1.
  • [x] extensions/pwa-install.js: Bumped Service Worker registration cachebuster to sw.js?v=5.2.1.
  • [x] ui/dashboard.js: Bumped template index fetch cachebuster to ?v=5.2.1.
  • [x] extensions/geo-defense.js: Updated version header comment to (v5.2.1).
  • [x] Automated Verification: Executed Playwright test suite confirming editor fill, dynamic vertical stretching, print DOM parity, and Shift-drag proportional scaling with 0 errors.

πŸŽ‰ Version 5.2.1 - Open Publisher

Source: README.md, updated 2026-10-02