From ec74cb2dc685e02b2934d12617dbbb32f78da81e Mon Sep 17 00:00:00 2001 From: Benedikt Stebner Date: Tue, 25 Apr 2023 18:30:39 +0200 Subject: [PATCH] Fix font fallback for control characters --- src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs b/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs index 253c7075fa..7d4fac337d 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs @@ -185,7 +185,9 @@ namespace Avalonia.Media.TextFormatting } //Stop at the first missing glyph - if (!currentCodepoint.IsBreakChar && !glyphTypeface.TryGetGlyph(currentCodepoint, out _)) + if (!currentCodepoint.IsBreakChar && + currentCodepoint.GeneralCategory != GeneralCategory.Control && + !glyphTypeface.TryGetGlyph(currentCodepoint, out _)) { break; }