Browse Source

Fix run bounds union (#13847)

pull/13893/head
Benedikt Stebner 2 years ago
committed by GitHub
parent
commit
a6e4a2feed
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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