From dede6b09bf18bf3a405bd59318160780a89f9127 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 24 Jan 2026 19:03:57 +0000 Subject: [PATCH] Use integer character width (8px) instead of fractional (8.4px) Integer pixel positions render more crisply and align better with browser rendering. --- src/textual_webterm/svg_exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual_webterm/svg_exporter.py b/src/textual_webterm/svg_exporter.py index 0dc33f0..5ce1c8a 100644 --- a/src/textual_webterm/svg_exporter.py +++ b/src/textual_webterm/svg_exporter.py @@ -48,7 +48,7 @@ FONT_FAMILY = ( ) FONT_SIZE = 14 LINE_HEIGHT = 1.2 -CHAR_WIDTH = 8.4 # Approximate width of monospace character at 14px +CHAR_WIDTH = 8 # Width of monospace character at 14px (typically ~0.57 ratio) class CharData(TypedDict):