summaryrefslogtreecommitdiff
path: root/src/layout
AgeCommit message (Collapse)Author
2021-03-30Fix double leading ๐ŸžLaurenz
2021-03-29Fixed par layouter directions ๐Ÿ—œLaurenz
2021-03-29Line break iterating run shaper ๐ŸŒตLaurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-03-29Write spaces and linebreaks into text runs โœ’Laurenz
2021-03-27Better space coalescing logic ๐ŸŒงLaurenz
This creates a smaller state machine helper type for softness coalescing, which does not own the resulting nodes. While this creates a bit more duplication in stack and par builder, it makes it a lot easier to integrate additional logic into the paragraph builder. Furthermore: - Line breaks are now "hard", that is, not coalesced with each other. - Text nodes with equal style are now merged allowing for example `f{}i` to form a ligature.
2021-03-25Refactor alignments & directions ๐Ÿ“Laurenz
- Adds lang function - Refactors execution context - Adds StackChild and ParChild enums
2021-03-24Make pdf module top-level ๐ŸงฑLaurenz
2021-03-24Text shaping ๐Ÿš€Laurenz
- Shapes text with rustybuzz - Font fallback with family list - Tofus are shown in the first font Co-Authored-By: Martin <mhaug@live.de>
2021-03-22Better font family definitions โœ’Laurenz
2021-03-20Square, circle and ellipse ๐Ÿ”ตLaurenz
2021-03-19Text colors ๐Ÿฆฉ (#18)Martin
2021-03-19Better debug representations ๐Ÿ’ปLaurenz
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-03-13Factor out alignment deduplication into separate function โ™ปLaurenz
2021-03-12Rename ChildAlign to LayoutAligns โœLaurenz
2021-03-11Better expansion behaviour ๐ŸชLaurenz
This makes expansion behaviour inheritable by placing it into the area and passing it down during layouting instead of computing some approximation of what we want during execution.
2021-03-10Better line spacing calculations โ†•Laurenz
- Only add line spacing between lines. Previously, line spacing was added below every line, making `#box[word]` higher than just `word`. - Compute box height of text as `ascender - descender` so that the full word is contained in the box.
2021-03-09Rename run to line and add some explanatory comments โœLaurenz
The name run was a relict of the time where a line consisted of a set of runs with same alignment. While these runs still exist conceptually, they are all stored flatly together in what was now renamed from `run` to `line`.
2021-02-12Cleaning ๐ŸงนLaurenz
2021-02-09Split evaluation and execution ๐Ÿ”ชLaurenz
2021-02-06Generalize child of NodeBackground ๐ŸผMartin Haug
2021-02-06Merge `rect` and `box` ๐ŸฆšMartin Haug
2021-02-04Add rectangle function ๐ŸŽ›Martin Haug
2021-01-20If expressions ๐Ÿ”€Laurenz
2021-01-15Split state and scopes, less ref-counting ๐Ÿ”€Laurenz
2021-01-14Move test files into category subfolders ๐ŸššLaurenz
2021-01-13Unbounded pages ๐ŸŒŒLaurenz
2021-01-13Some minor improvements โ™ปLaurenz
2021-01-04Better value representations, type function ๐ŸŒLaurenz
2021-01-03Move and rename many things ๐Ÿš›Laurenz
2021-01-01A few small improvements โ™ป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-28Export alpha channel into PDF ๐ŸงŠLaurenz
2020-11-27Basic environment and resource loader ๐ŸžLaurenz
2020-11-27Export images in PDF ๐Ÿ–ผLaurenz
2020-11-25Merge some modules ๐ŸฅžLaurenz
2020-11-24Use newly stabilized intra doc links โ†ฉLaurenz
2020-11-20Basic image support ๐Ÿ–ผLaurenz
- [image] function - Image rendering in tests - Supports JPEG and PNG - No PDF export so far
2020-10-13BoxAlign and Flow aliases โœLaurenz
2020-10-13Rename geometric eval and apply to resolve โœLaurenz
2020-10-12Naming and grammar โœ”Laurenz
2020-10-12Less vecs in layouting โšกLaurenz
2020-10-12Synchronous layout ๐Ÿช€Laurenz
2020-10-12Adapt to fontdock ๐Ÿ”ผLaurenz
2020-10-11Evaluation benchmark ๐Ÿ”‹Laurenz
2020-10-11Refactor paragraph layout ๐Ÿ“ฐLaurenz
2020-10-11Refactor stack layout again ๐ŸงฃLaurenz
2020-10-11Refactor layouting base ๐ŸชLaurenz
2020-10-11Rename LayoutItem to Layouted โœLaurenz