diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-19 17:57:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-19 17:57:31 +0100 |
| commit | 264a7dedd42e27cd9e604037640cf0594b2ec46b (patch) | |
| tree | d26feea399d54bb86bd44878f40293983bf5251d /src/library/font.rs | |
| parent | ca3df70e2a5069832d7d2135967674c34a155442 (diff) | |
Scheduled maintenance 🔨
- 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
Diffstat (limited to 'src/library/font.rs')
| -rw-r--r-- | src/library/font.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/library/font.rs b/src/library/font.rs index ecc15d96..00fd0e81 100644 --- a/src/library/font.rs +++ b/src/library/font.rs @@ -1,7 +1,6 @@ use fontdock::{FontStretch, FontStyle, FontWeight}; use super::*; -use crate::shaping::VerticalFontMetric; /// `font`: Configure the font. /// @@ -55,7 +54,7 @@ use crate::shaping::VerticalFontMetric; /// - `x-height` /// - `baseline` /// - `descender` -pub fn font(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { +pub fn font(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { let size = args.find::<Linear>(ctx); let list: Vec<_> = args.filter::<FontFamily>(ctx).map(|f| f.to_string()).collect(); let style = args.get(ctx, "style"); @@ -66,7 +65,7 @@ pub fn font(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { let serif = args.get(ctx, "serif"); let sans_serif = args.get(ctx, "sans-serif"); let monospace = args.get(ctx, "monospace"); - let body = args.find::<ValueTemplate>(ctx); + let body = args.find::<TemplateValue>(ctx); Value::template("font", move |ctx| { let snapshot = ctx.state.clone(); |
