diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-18 14:17:20 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-18 15:06:13 +0100 |
| commit | ed81049ddc8fcef3ddf6f6f69d95bb52512bf698 (patch) | |
| tree | 5ee2e955b4fa50bc536d215577a0321c9b4c6617 /src/exec/context.rs | |
| parent | cc964e32c993e9446896f8a75731783108866ce8 (diff) | |
Show repr in monospace 📏
Diffstat (limited to 'src/exec/context.rs')
| -rw-r--r-- | src/exec/context.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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(); |
