mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-01 22:26:49 -06:00
A drop cap came out the same size whatever its point size: the fit (drop + body cap height) / (the cap's own cap height) cancels the cap's size, since its own cap height grows with it. InDesign fits the cap as if it were set at the body text's size and scales that by the cap's size over the body's, keeping its baseline: a larger cap rises above the first line, a smaller one falls short of it. Measured against an InDesign capture (Palatino, 14 pt body, 18 pt italic T, 2 lines): cap height 2.04x the line gap there, 2.03x predicted. The cap's box (selection highlight, caret) now reaches the top of a cap that rises above its line; selected glyphs are drawn inverted, so the part outside the box would vanish. A one-line cap still keeps its own size when that is smaller. Test: drop_cap_scales_with_its_point_size (a 15 pt cap over 10 pt text is 1.5x the fitted height on the same baseline, 7.5 pt is 0.75x, the body lines don't move, the box covers the cap). Before the fix the 15 pt cap was 30.7 pt, the same as at 10 pt; with it, 46.05 pt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa