Skip to content

Commit d72ed10

Browse files
authored
Make sure GlyphRunImpl.InkBounds are always at a positive location (#16601)
1 parent c50e731 commit d72ed10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Skia/Avalonia.Skia/GlyphRunImpl.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public GlyphRunImpl(IGlyphTypeface glyphTypeface, double fontRenderingEmSize,
7575
currentX += advance;
7676
}
7777

78+
if (runBounds.Left < 0)
79+
{
80+
runBounds = runBounds.Translate(new Vector(-runBounds.Left, 0));
81+
}
82+
7883
ArrayPool<SKRect>.Shared.Return(glyphBounds);
7984

8085
BaselineOrigin = baselineOrigin;

0 commit comments

Comments
 (0)