mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-18 08:07:12 +00:00
The warnings composed every story once with no page. For a frame on a parent
page that is wrong twice over, and I measured both:
exportPdf {"pages": [2]}
["the story in frame 9: 76 character(s) do not fit and are not in the
export"]
Page 2 used no parent at all, so nothing of that frame was in its export to be
missing -- and the warning named no page, because a parent frame has no
document page of its own. It now resolves the pages that draw the parent page
and reports only those:
{"pages": [1]} ["page 1: 76 character(s) ... frame 9 ..."]
{"pages": [2]} []
The second half is page-dependent text. A parent frame 112 pt wide holding
"Continued on page <marker>" fits while the number is one digit and does not
once it is two, so composing it once could not tell:
{"pages": [1]} []
{"pages": [9]} []
{"pages": [10]} ["page 10: 1 character(s) ..."]
{} ["pages 10, 11, 12: 1 character(s) ..."]
Each page that shows the parent is composed as that page, and the pages are
grouped by how much they lose, so a story still gets one line.
Also from review: `story.get` now says `overset` is a UTF-8 byte offset into
`text`, not a character index. A test measures the difference on French text,
where the offset runs ahead of the character count.