From ed81049ddc8fcef3ddf6f6f69d95bb52512bf698 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 18 Feb 2021 14:17:20 +0100 Subject: =?UTF-8?q?Show=20repr=20in=20monospace=20=F0=9F=93=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exec/context.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/exec/context.rs') diff --git a/src/exec/context.rs b/src/exec/context.rs index 821a2616..5ff55c00 100644 --- a/src/exec/context.rs +++ b/src/exec/context.rs @@ -259,6 +259,13 @@ impl<'a> ExecContext<'a> { } } + /// Set the font to monospace. + pub fn apply_monospace(&mut self) { + let families = self.state.font.families_mut(); + families.list.insert(0, "monospace".to_string()); + families.flatten(); + } + /// Apply a forced line break. pub fn apply_linebreak(&mut self) { self.end_par_group(); -- cgit v1.2.3