Style.HaloWidth spikes badly at acute glyph corners (V, W, Y, A, K, 1, ! etc), worse as halo width grows relative to font size. At larger widths the spike can end up roughly as tall as the glyph itself.
Screenshot (halo=8, sizes 8/16/32/64, same spike at every size):
Root cause looks like FontRun.Paint() building paintHalo as a stroke paint but never setting StrokeJoin:
https://github.com/toptensoftware/RichTextKit/blob/master/Topten.RichTextKit/FontRun.cs#L626-L652
That leaves it on Skia's default Miter join, which is unbounded until the default miter limit (~4x half the stroke width) kicks in, exactly what produces the long spikes on acute corners.
Repro: any text with HaloWidth around 8+ at a normal UI font size (16-32px), any font with reasonably sharp vertices (plain Arial reproduces it).
Fix is probably a one-liner, setting paintHalo.StrokeJoin = SKStrokeJoin.Round next to the rest of the paint setup around line 648. Round join is what most other text-outline implementations use (browser -webkit-text-stroke, Unity TextMeshPro) for this exact reason. Happy to send a PR if that's the right direction.
Style.HaloWidthspikes badly at acute glyph corners (V, W, Y, A, K, 1, ! etc), worse as halo width grows relative to font size. At larger widths the spike can end up roughly as tall as the glyph itself.Screenshot (halo=8, sizes 8/16/32/64, same spike at every size):
Root cause looks like
FontRun.Paint()buildingpaintHaloas a stroke paint but never settingStrokeJoin:https://github.com/toptensoftware/RichTextKit/blob/master/Topten.RichTextKit/FontRun.cs#L626-L652
That leaves it on Skia's default
Miterjoin, which is unbounded until the default miter limit (~4x half the stroke width) kicks in, exactly what produces the long spikes on acute corners.Repro: any text with
HaloWidtharound 8+ at a normal UI font size (16-32px), any font with reasonably sharp vertices (plain Arial reproduces it).Fix is probably a one-liner, setting
paintHalo.StrokeJoin = SKStrokeJoin.Roundnext to the rest of the paint setup around line 648. Round join is what most other text-outline implementations use (browser-webkit-text-stroke, Unity TextMeshPro) for this exact reason. Happy to send a PR if that's the right direction.