From 95a7871bdcdb6246b422057e7e72e33bb1b8cf0b Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Wed, 14 Aug 2024 14:32:45 +0000 Subject: [PATCH] make empty text run content empty --- src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs b/src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs index 8e2325fb14..b7b275b87e 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs @@ -680,7 +680,7 @@ namespace Avalonia.Media.TextFormatting var glyph = glyphTypeface.GetGlyph(s_empty[0]); var glyphInfos = new[] { new GlyphInfo(glyph, firstTextSourceIndex, 0.0) }; - var shapedBuffer = new ShapedBuffer(s_empty.AsMemory(), glyphInfos, glyphTypeface, properties.FontRenderingEmSize, + var shapedBuffer = new ShapedBuffer(ReadOnlyMemory.Empty, glyphInfos, glyphTypeface, properties.FontRenderingEmSize, (sbyte)flowDirection); var textRuns = new TextRun[] { new ShapedTextRun(shapedBuffer, properties) };