Skip to main content

Module notes

Module notes 

Source
Expand description

Footnote and endnote content, laid out once before pagination.

Notes used to be laid out inside the post-pagination pass that drew them, which meant pagination could not know how much room they would need and drew body text straight over them. Laying them out here, ahead of pagination, lets the paginator reserve exactly the height it will later draw. Reserve and render read the same lines, so they cannot disagree.

The marker is shaped here too. The paginator only holds &FontManager and shaping needs &mut, so a note that arrives pre-shaped is a note the paginator can place without touching a font.

Structs§

NoteLayout
One note, laid out and ready to place.
NoteRegistry
Every note the document defines, laid out once.

Constants§

NOTE_INDENT
Horizontal space reserved for the marker, to the left of note text.
NOTE_SEPARATOR_OFFSET
Vertical gap between the separator rule and the first note line.
SEPARATOR_WIDTH_FRACTION
Width of the rule above a note that starts on its own page, as a fraction of the content width.