diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-03 13:23:59 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-03 13:23:59 +0200 |
| commit | 0fc25d732d7cbc37cf801645849d1060f2cec4a3 (patch) | |
| tree | 706aa8d1bf4135d1dd3ac17a5023bc5e24ded69d /src/lib.rs | |
| parent | 8dbc5b60cc4a88f68ee82607af3a3c454cd8f68b (diff) | |
Port to kurbo 🎋
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -93,17 +93,17 @@ impl Typesetter { /// Layout a syntax tree and return the produced layout. pub async fn layout(&self, tree: &SynTree) -> Pass<MultiLayout> { - let margins = self.style.page.margins(); + let space = LayoutSpace { + size: self.style.page.size, + insets: self.style.page.insets(), + expansion: LayoutExpansion::new(true, true), + }; layout(&tree, LayoutContext { loader: &self.loader, scope: &self.std, style: &self.style, - base: self.style.page.size.unpadded(margins), - spaces: vec![LayoutSpace { - size: self.style.page.size, - padding: margins, - expansion: LayoutExpansion::new(true, true), - }], + base: space.usable(), + spaces: vec![space], repeat: true, sys: LayoutSystem::new(Dir::LTR, Dir::TTB), align: LayoutAlign::new(GenAlign::Start, GenAlign::Start), |
