Xteink-X4-crosspoint-reader/lib/Epub
Jake Kenneally cb4d86fec6
fix: prevent spurious spaces before attaching punctuation (#694)
Fixes issue #182

## Summary

**What is the goal of this PR?** 
When inline styles change mid-paragraph, words like periods, commas, and
quotes could end up as separate tokens. The justified text algorithm was
treating these as regular words, adding space before them.

**What changes are included?**

Now tracks which words are "attaching punctuation" (., , ! ? ; : " ' and
smart quotes) and excludes them from gap counting. These punctuation
marks attach directly to the preceding word without spacing.

## Additional Context

This is split out from code in #411 to address this comment
https://github.com/crosspoint-reader/crosspoint-reader/pull/411#discussion_r2751166631

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**YES**_, Claude Code
2026-02-06 01:55:15 +11:00
..
Epub fix: prevent spurious spaces before attaching punctuation (#694) 2026-02-06 01:55:15 +11:00
Epub.cpp feat: UI themes, Lyra (#528) 2026-02-05 21:50:11 +11:00
Epub.h feat: UI themes, Lyra (#528) 2026-02-05 21:50:11 +11:00