mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-31 22:07:06 -06:00
The drop-cap letter's size was `clamp(rc.size, 1000.0)`, and `f32::clamp` panics when the minimum is above the maximum, which happens as soon as the paragraph's text is larger than 1000 pt (Word allows up to 1638). Layout, PDF export and saving run outside `Session::run`'s panic guard, so the desktop app panicked on every frame, and `wordcraft-cli convert` failed. Use `.min(1000.0).max(rc.size)`, which never panics and keeps the letter at least as large as the text. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>