mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-01 18:25:32 -06:00
Fit text is stretched by scaling its width factor by span / shaped width and shaping again. With a span that is a tiny part of the text's width the scaled factor is too small for the fonts, which then draw at a factor of 1: the text is far wider than its span, and the extents reported only the span. The extents now take the unstretched width in that case, as they do for an unusable stored factor. Test (render, which sees both): the drawn text lies inside the drawing's extents for a span too short to fit and for one that fits. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>