diff options
Diffstat (limited to 'src/library')
| -rw-r--r-- | src/library/font.rs | 5 | ||||
| -rw-r--r-- | src/library/mod.rs | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/library/font.rs b/src/library/font.rs index 07707e90..8e62563e 100644 --- a/src/library/font.rs +++ b/src/library/font.rs @@ -20,7 +20,10 @@ function! { layout(self, ctx, errors) { styled(&self.body, ctx, Some(&self.list), - |s, l| s.fallback.list = l.clone()) + |s, list| { + s.fallback.list = list.clone(); + s.fallback.flatten(); + }) } } diff --git a/src/library/mod.rs b/src/library/mod.rs index 02311c0d..1a36fcc7 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -1,5 +1,6 @@ //! The _Typst_ standard library. +use toddle::query::FontProvider; use crate::syntax::Scope; use crate::func::prelude::*; @@ -68,7 +69,7 @@ function! { /// Layout an optional body with a change of the text style. fn styled<'a, T, F>( body: &'a Option<SyntaxModel>, - ctx: LayoutContext, + ctx: LayoutContext<'_>, data: Option<T>, f: F, ) -> Commands<'a> where F: FnOnce(&mut TextStyle, T) { |
