mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-03 00:40:33 -06:00
* Layout: tab leader dots spaced and placed as in Word Measured in Word for Windows with six fonts at four sizes: Word spaces leader dots by the dot's advance at the font size in whole 600-dpi pixels (the size itself in whole pixels), so a TH SarabunPSK dot at 16 pt (2.59 pt) is drawn every 2.64 pt and a Tahoma one at 22 pt every 6.6 pt. The dots sit on the page's grid of that pitch, from the first place after the text before the tab to the last one that ends before the text after it. WordCraft drew them at the unrounded advance, half a dot after the text and 1.2 dots short of the number, so a table of contents line had a dot or two more than Word's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Layout: each leader dot's place comes from its grid index The leader's dots were placed by adding the pitch to the last place, so on a long leader the rounding of each addition added up. From 72 to 528 pt at 2.64 pt it came to more than the 0.001 pt allowed at the end, and the last dot, which ends exactly on 528 pt, was left out. `leader_xs` now works out each place as its grid index times the pitch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Layout: name the leader slack and glyph limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Layout: leader dots use the font size rounded to whole pixels Word rounds the font size to the nearest 600-dpi pixel before it rounds the dot's advance (Arial 14 pt: 116.7 px, so 117, dots every 3.96 pt); taking the floor drew them 3.84 pt apart, as measured at 11, 14, 17, 20 and 26 pt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * leader_xs: saturate the glyph range end --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>