Browse Source

Fix font fallback for control characters

pull/11066/head
Benedikt Stebner 3 years ago
parent
commit
ec74cb2dc6
  1. 4
      src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs

4
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;
}

Loading…
Cancel
Save