From 23d108c8e099798dc4d35ce9cbcd3e37fb50f3b2 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 2 Apr 2022 21:55:25 +0200 Subject: Font fallback --- src/eval/value.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/eval/value.rs') diff --git a/src/eval/value.rs b/src/eval/value.rs index a76b377d..300444de 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -7,6 +7,7 @@ use std::sync::Arc; use super::{ops, Args, Array, Content, Context, Dict, Func, Layout, StrExt}; use crate::diag::{with_alternative, At, StrResult, TypResult}; use crate::geom::{Angle, Color, Fractional, Length, Linear, Relative, RgbaColor}; +use crate::library::text::RawNode; use crate::syntax::{Span, Spanned}; use crate::util::EcoString; @@ -115,9 +116,10 @@ impl Value { Value::Float(v) => Content::Text(format_eco!("{}", v)), Value::Str(v) => Content::Text(v), Value::Content(v) => v, - // For values which can't be shown "naturally", we print the - // representation in monospace. - v => Content::Text(v.repr()).monospaced(), + + // For values which can't be shown "naturally", we return the raw + // representation. + v => Content::show(RawNode { text: v.repr(), block: false }), } } -- cgit v1.2.3