Skip to content

Commit 59590fc

Browse files
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.
1 parent e332c67 commit 59590fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/renderer/atlas/AtlasEngine.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,13 @@ try
500500
{
501501
for (const auto& cluster : clusters)
502502
{
503-
for (const auto& ch : cluster.GetText())
503+
for (auto ch : cluster.GetText())
504504
{
505+
// Render Unicode directional isolate characters (U+2066..U+2069) as zero-width spaces.
506+
if (ch >= L'\u2066' && ch <= L'\u2069')
507+
{
508+
ch = L'\u200B';
509+
}
505510
_api.bufferLine.emplace_back(ch);
506511
_api.bufferLineColumn.emplace_back(columnEnd);
507512
}

0 commit comments

Comments
 (0)