From 645b58823d146aff8f33fecab0be97a324943adb Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Mon, 28 Mar 2022 12:39:56 +0100 Subject: [PATCH] Add support for blink and blink2 to SVG export, use Fira Code webfont fallback --- rich/console.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/rich/console.py b/rich/console.py index fbfe542f3..c3474b5a4 100644 --- a/rich/console.py +++ b/rich/console.py @@ -119,6 +119,22 @@ class NoChange: {text}' + # If the style doesn't contain a color, we still # need to make sure we output the default foreground color # from the TerminalTheme. @@ -2364,7 +2391,7 @@ def export_svg( # Monospace fonts are generally around 0.5-0.55 width/height ratio, but I've # added extra width to ensure that the output SVG is big enough. - monospace_font_width_scale = 0.6 + monospace_font_width_scale = 0.57 # This works out as a good heuristic for the final size of the drawn terminal. terminal_height = required_code_height + code_start_y