summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-24 17:12:34 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-24 17:12:34 +0100
commit73615f7e3ce23f2ea656d04ea9f96184f5ebdc0a (patch)
tree7691b792e1e4b33469a72c40fc76854f1de0814e /src/library
parent6720520ec06dd0718f81049b2b11e81664f7ef62 (diff)
Text shaping 🚀
- Shapes text with rustybuzz - Font fallback with family list - Tofus are shown in the first font Co-Authored-By: Martin <mhaug@live.de>
Diffstat (limited to 'src/library')
-rw-r--r--src/library/mod.rs2
-rw-r--r--src/library/spacing.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/library/mod.rs b/src/library/mod.rs
index 58e62d56..1f412cd0 100644
--- a/src/library/mod.rs
+++ b/src/library/mod.rs
@@ -32,8 +32,8 @@ use fontdock::{FontStyle, FontWeight};
use crate::eval::{AnyValue, FuncValue, Scope};
use crate::eval::{EvalContext, FuncArgs, TemplateValue, Value};
use crate::exec::{Exec, ExecContext, FontFamily};
+use crate::font::VerticalFontMetric;
use crate::geom::*;
-use crate::layout::VerticalFontMetric;
use crate::syntax::{Node, Spanned};
/// Construct a scope containing all standard library definitions.
diff --git a/src/library/spacing.rs b/src/library/spacing.rs
index 506f6585..d4648566 100644
--- a/src/library/spacing.rs
+++ b/src/library/spacing.rs
@@ -27,7 +27,7 @@ fn spacing_impl(ctx: &mut EvalContext, args: &mut FuncArgs, axis: SpecAxis) -> V
let spacing: Option<Linear> = args.require(ctx, "spacing");
Value::template("spacing", move |ctx| {
if let Some(linear) = spacing {
- let amount = linear.resolve(ctx.state.font.font_size());
+ let amount = linear.resolve(ctx.state.font.resolve_size());
let spacing = SpacingNode { amount, softness: 0 };
if axis == ctx.state.dirs.main.axis() {
ctx.push_into_stack(spacing);