From 59590fc6657ece06ef7d2006f5fd5907b1ba1828 Mon Sep 17 00:00:00 2001 From: Adaline Valentina Simonian Date: Fri, 30 May 2025 10:06:39 -0700 Subject: [PATCH] fix: don't render bidi isolates LRI, RLI, FSI, PDI (#18942) Skips rendering LRI, RLI, FSI, and PDI "glyphs" in the terminal. Does not implement BIDI/RTL; that is out of scope, see #538. This is just a hotfix to stop spamming the console with undesired character printouts. Once BIDI support is implemented, this change will (maybe?) no longer be necessary. Fixes #16574. --- src/renderer/atlas/AtlasEngine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/atlas/AtlasEngine.cpp b/src/renderer/atlas/AtlasEngine.cpp index 856b46f0fb..d2e9f8bf26 100644 --- a/src/renderer/atlas/AtlasEngine.cpp +++ b/src/renderer/atlas/AtlasEngine.cpp @@ -500,8 +500,13 @@ try { for (const auto& cluster : clusters) { - for (const auto& ch : cluster.GetText()) + for (auto ch : cluster.GetText()) { + // Render Unicode directional isolate characters (U+2066..U+2069) as zero-width spaces. + if (ch >= L'\u2066' && ch <= L'\u2069') + { + ch = L'\u200B'; + } _api.bufferLine.emplace_back(ch); _api.bufferLineColumn.emplace_back(columnEnd); }