summaryrefslogtreecommitdiff
path: root/src/model/library.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-02 13:17:07 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-02 13:21:36 +0100
commit5110a41de1ca2236739ace2d37a1af912bb029f1 (patch)
tree22cc223140052bd7ec10798f5ecbffaae7c934a8 /src/model/library.rs
parent33ab1fdbdda4e95e48b767a3f7f8f66413b6de0e (diff)
Introduce virtual typesetter
Diffstat (limited to 'src/model/library.rs')
-rw-r--r--src/model/library.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/model/library.rs b/src/model/library.rs
index 518caca1..eee69675 100644
--- a/src/model/library.rs
+++ b/src/model/library.rs
@@ -2,15 +2,13 @@ use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher};
use std::num::NonZeroUsize;
-use comemo::Tracked;
use once_cell::sync::OnceCell;
-use super::{Content, NodeId, Scope, StyleChain, StyleMap};
+use super::{Content, NodeId, Scope, StyleChain, StyleMap, Vt};
use crate::diag::SourceResult;
use crate::doc::Document;
use crate::geom::{Abs, Dir};
use crate::util::{hash128, EcoString};
-use crate::World;
/// Definition of Typst's standard library.
#[derive(Debug, Clone, Hash)]
@@ -27,11 +25,8 @@ pub struct Library {
#[derive(Clone)]
pub struct LangItems {
/// The root layout function.
- pub layout: fn(
- world: Tracked<dyn World>,
- content: &Content,
- styles: StyleChain,
- ) -> SourceResult<Document>,
+ pub layout:
+ fn(vt: &mut Vt, content: &Content, styles: StyleChain) -> SourceResult<Document>,
/// Access the em size.
pub em: fn(StyleChain) -> Abs,
/// Access the text direction.