summaryrefslogtreecommitdiff
path: root/src/layout/spacing.rs
AgeCommit message (Collapse)Author
2021-10-23Introduce page / block / inline levelsLaurenz
2021-10-23Revise block node contractLaurenz
Frames produced by block nodes are now always treated as exactly one per given region and a frame must not be larger than its respective region. Any overflow must be handled internally. This means that stack and grid don't need to search for fitting regions anymore, since the child has already does that for them. This commit further moves stack spacing into a new `SpacingNode`.
2021-03-25Refactor alignments & directions 📐Laurenz
- Adds lang function - Refactors execution context - Adds StackChild and ParChild enums
2021-03-19Scheduled maintenance 🔨Laurenz
- New naming scheme - TextNode instead of NodeText - CallExpr instead of ExprCall - ... - Less glob imports - Removes Value::Args variant - Removes prelude - Renames Layouted to Fragment - Moves font into env - Moves shaping into layout - Moves frame into separate module
2021-03-19Configurable font edges ⚙Laurenz
Adds top-edge and bottom-edge parameters to the font function. These define how the box around a word is computed. The possible values are: - ascender - cap-height (default top edge) - x-height - baseline (default bottom edge) - descender The defaults are chosen so that it's easy to create good-looking designs with vertical alignment. Since they are much tighter than what most other software uses by default, the default leading had to be increased to 50% of the font size and paragraph spacing to 100% of the font size. The values cap-height and x-height fall back to ascender in case they are zero because this value may occur in fonts that don't have glyphs with cap- or x-height (like Twitter Color Emoji). Since cap-height is the default top edge, doing no fallback would break things badly. Removes softness in favor of a simple boolean for pages and a more finegread u8 for spacing. This is needed to make paragraph spacing consume line spacing created by hard line breaks.
2021-02-09Split evaluation and execution 🔪Laurenz
2021-01-14Move test files into category subfolders 🚚Laurenz
2021-01-03Move and rename many things 🚛Laurenz
2020-12-17Test [page] function 📕Laurenz
- Make page break behaviour more consistent - Allow skipping reference image testing for single tests with `// compare-ref: false` (useful for tests which only check error messages)
2020-11-24Use newly stabilized intra doc links ↩Laurenz
2020-10-12Less vecs in layouting ⚡Laurenz
2020-10-12Synchronous layout 🪀Laurenz
2020-10-11Refactor layouting base 🪁Laurenz
2020-10-11Rename LayoutItem to Layouted ✏Laurenz
2020-10-10Switch back to custom geometry types, unified with layout primitives 🏞Laurenz