Fix xterm.js font override using canvas monkey-patch

The previous approach tried to access container.terminal which doesn't
exist since textual.js doesn't expose the terminal instance to the DOM.

New approach monkey-patches CanvasRenderingContext2D.prototype.font
setter BEFORE textual.js loads to intercept all canvas font assignments
and replace xterm.js default font with our custom monospace stack.

Bump version to 0.3.16
This commit is contained in:
GitHub Copilot
2026-01-25 12:22:34 +00:00
parent 9f8770b168
commit 8b0e7f5bbe
2 changed files with 39 additions and 38 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual-webterm"
version = "0.3.15"
version = "0.3.16"
description = "Serve terminal sessions over the web"
authors = ["Will McGugan <will@textualize.io>"]
license = "MIT"