Files
wordcraft/crates/layout
loganjandClaude Sonnet 5.5 da07540f31 Layout: a drop cap in a font over 1000 pt no longer panics (#389)
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>
2026-10-10 19:29:27 -04:00
..