Browse Source

Fix run bounds union (#13847)

release/11.0.7
Benedikt Stebner 3 years ago
committed by Max Katz
parent
commit
b70fd2f875
  1. 3
      src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

3
src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

@ -1245,8 +1245,9 @@ namespace Avalonia.Media.TextFormatting
{
var textMetrics = textRun.TextMetrics;
var glyphRun = textRun.GlyphRun;
var runBounds = glyphRun.InkBounds.WithX(widthIncludingWhitespace + glyphRun.InkBounds.X);
bounds = bounds.Union(glyphRun.InkBounds);
bounds = bounds.Union(runBounds);
if (fontRenderingEmSize < textMetrics.FontRenderingEmSize)
{

Loading…
Cancel
Save