| Age | Commit message (Collapse) | Author |
|
|
|
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`.
|
|
|
|
|
|
|
|
|
|
|
|
- Templates scope state changes
- State-modifying function operate in place instead of returning a template
- Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map
- No more wide calls
|
|
|
|
|
|
|
|
|
|
|
|
- font
- color -> fill
- shorthands for families and size
- decoration functions
- color -> stroke
- strength -> thickness
- position -> offset
- invert offsets: now positive goes downwards just like the rest of typst
|
|
|
|
|
|
|
|
|
|
|
|
This prepares the incremental PR.
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
|
|
|
|
|
|
|
|
|
|
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
|
|
|
|
Co-Authored-By: Martin <mhaug@live.de>
|
|
|
|
Co-Authored-By: Martin <mhaug@live.de>
|
|
The previous paragraph layout algorithm had a couple of flaws:
- It always produced line break opportunities between runs although on
the textual level there might have been none.
- It didn't handle trailing spacing correctly in some cases.
- It wouldn't have been easily adaptable to Knuth-Plass style optimal
line breaking because it was fundamentally structured first-fit
run-by-run.
The new paragraph layout algorithm fixes these flaws. It proceeds
roughly in the following stages:
1. Collect all text in the paragraph.
2. Compute BiDi embedding levels.
3. Shape all runs, layout all children and store the resulting items in
a reusable (possibly even cacheable) `ParLayout`.
3. Iterate over all line breaks in the concatenated text.
4. Construct lightweight `LineLayout` objects for full lines instead of
runs. These mostly borrow from the `ParLayout` and only reshape the
first and last run if necessary. The design allows to use Harfbuzz's
UNSAFE_TO_BREAK mechanism to make reshaping more efficient. The size
of a `LineLayout` can be measured without building the line's frame.
5. Build only the selected line's frames and stack them.
|
|
|
|
|
|
|
|
- Shapes text with rustybuzz
- Font fallback with family list
- Tofus are shown in the first font
Co-Authored-By: Martin <mhaug@live.de>
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|