Don't merge box-drawing characters for precise positioning
Box-drawing and block element characters (U+2500-U+259F, U+25A0-U+25FF) are now rendered as individual tspans with their own x positions to prevent visual misalignment caused by font rendering variations.
This commit is contained in:
@@ -716,14 +716,17 @@ class TestEdgeCases:
|
||||
assert "A中B🎉C" in svg
|
||||
|
||||
def test_special_unicode_blocks(self) -> None:
|
||||
"""Unicode box drawing characters render."""
|
||||
"""Unicode box drawing characters render (separately for precise positioning)."""
|
||||
buffer = [[
|
||||
self._char("┌"),
|
||||
self._char("─"),
|
||||
self._char("┐"),
|
||||
]]
|
||||
svg = render_terminal_svg(buffer, width=3, height=1)
|
||||
assert "┌─┐" in svg
|
||||
# Box drawing chars are rendered separately for precise x positioning
|
||||
assert "┌" in svg
|
||||
assert "─" in svg
|
||||
assert "┐" in svg
|
||||
|
||||
def test_ansi_bright_colors(self) -> None:
|
||||
"""All bright ANSI colors render."""
|
||||
|
||||
Reference in New Issue
Block a user