| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher5-i386-windowsXP.exe | 2026-10-17 | 56.5 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-17 | 183.2 MB | |
| 5.9.4_ Printed Text Background Word-Wrap Prevention _ Width Ceiling Lock source code.tar.gz | 2026-10-17 | 23.3 MB | |
| 5.9.4_ Printed Text Background Word-Wrap Prevention _ Width Ceiling Lock source code.zip | 2026-10-17 | 23.6 MB | |
| README.md | 2026-10-17 | 5.6 kB | |
| openpublisher5_amd64-windows.exe | 2026-10-17 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-17 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-17 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-17 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-17 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-17 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-10-17 | 166.4 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-17 | 185.5 MB | |
| Totals: 13 Items | 1.8 GB | 0 | |
π Summary
Version 5.9.4 resolves a regression introduced in v5.9.3 where trailing words on multi-word lines inside segmented inline text backgrounds (such as "street" in "17 Paynter street" or "gardens" in "Orange gardens") disappeared during print and PDF export while their dark background strip remained full-width.
Open Publisher v5.9.4 enforces single-line whitespace locking (white-space: nowrap or white-space: pre) on every segmented line element and restores integer ceiling rounding (Math.ceil) when freezing pixel widths onto line.style.width, ensuring that trailing words never wrap behind subsequent background strips while preserving the exact 1-2px inter-line gap, sharp 90-degree corners, and zero cumulative vertical offset established in v5.9.3.
π Root Cause Analysis & Architecture Solution
1. Why Trailing Words Vanished on Multi-Word Lines in v5.9.3
- In v5.9.3, after segmenting a multi-line inline
<span>into per-line block elements, each line's width was locked usingfinalW.toFixed(2) + 'px'without settingwhite-space: nowrap. - Whenever a line's sub-pixel width had a third decimal digit between
1and4(for example,128.344px),.toFixed(2)rounded the locked width down to128.34px(0.004pxnarrower than the text's actual advance width). - Because the box width remained
128.34px, the dark background strip still rendered at the full width of"17 Paynter street". However, because128.34pxwas0.004pxnarrower than the text and wrapping was still enabled, Chromium's line breaker wrapped the trailing word ("street"on Line 1,"gardens"on Line 2) onto a second line inside the fixed-height block (height: stripHeight). - When
html2canvasrendered the subsequent sibling line ("Orange"on Line 2,"Pembroke"on Line 3), that sibling's opaque dark#313338background painted directly over the wrapped word from the line above, making"street"and"gardens"appear completely invisible. Single-word lines ("Pembroke","Pembrokeshire","Sa714ed") had no spaces and therefore could not wrap.
2. Single-Line Whitespace Enforcement & Ceiling Width Locking
- Strict Single-Line Whitespace (
noWrapMode): Because every element inlinesCreatedhas already been segmented at both explicit<br>breaks and soft-wrap boundaries so that each element represents strictly one visual line,formatLineElementnow setsel.style.whiteSpace = noWrapMode('pre'when the source element usespre,pre-wrap, orbreak-spaces, and'nowrap'otherwise) andel.style.maxWidth = 'none'. This forbids the browser from ever breaking a segmented line across multiple lines. - Ceiling Pixel Width Locking (
Math.ceil):splitInlineBackgroundAtBrmeasurestextRect.widthandlineRect.widthprior to applying height constraints and roundstextW,rectW, andfinalWupward viaMath.ceil(...). This guarantees that the locked pixel width is always greater than or equal to the exact sub-pixel glyph advance width.
π Files Modified in 5.9.4
| File | Changes |
|---|---|
extensions/print-engine.js |
Updated splitInlineBackgroundAtBr to apply whiteSpace: noWrapMode (nowrap or pre), maxWidth: none, and Math.ceil width locking on segmented line elements prior to height locking. Bumped header to (v5.9.4). |
index.html |
Updated all script, stylesheet, and asset cachebuster queries in <head> and <body> from ?v=5.9.3 to ?v=5.9.4. |
sw.js |
Updated Service Worker cache namespace to open-publisher-v5-9-4 and header to (v5.9.4). |
elements/text/text.js |
Bumped header comment to (v5.9.4). |
core/core.js |
Bumped header comment to (v5.9.4). |
core/boot.js |
Bumped header comment to (v5.9.4). |
extensions/legacy-fixes.js |
Bumped header comment to (v5.9.4). |
extensions/ui-interactions.js |
Bumped header comment and initialization log to (v5.9.4). |
extensions/pwa-install.js |
Bumped header comment to (v5.9.4). |
ui/menus.js |
Bumped header comment to (v5.9.4). |
ui/sidebar-context.js |
Bumped header comment to (v5.9.4). |
ui/modals/card-sheet-modal.js |
Bumped header comment to (v5.9.4). |
ui/modals/options-modal.js |
Bumped header comment to (v5.9.4). |
tools/proofing/spellcheck-engine.js |
Bumped header comment to (v5.9.4). |
wrapper.html was not modified.
β v5.9.4 Verification Checklist
- [x] No Disappearing Trailing Words: Verified that multi-word lines (
"17 Paynter street","Orange gardens","Hope you're both ok") retain all words on their single line without wrapping behind adjacent background strips. - [x] Single-Line Whitespace Lock: Confirmed
white-space: nowrap(orprefor preformatted text) is applied to each segmented line element. - [x] Ceiling Width Rounding: Confirmed
Math.ceilis used fortextW,rectW, andfinalWso locked widths never round down below sub-pixel glyph advance widths. - [x] 1-2px Inter-Line Gap & Zero Vertical Offset Preserved: Verified that the 1-2px gap (
lineGap), sharp 90-degree corners (0pxradius), andstripHeight + lineGap === lineStridevertical parity from v5.9.3 remain completely intact. - [x] Service Worker & Cachebuster Sync: Verified
sw.jscache name isopen-publisher-v5-9-4and asset queries acrossindex.htmlreference?v=5.9.4. - [x] Subsystem Version Consistency: Confirmed all modified subsystems and modules reflect version 5.9.4.
π Version 5.9.4: Open Publisher