Description
With a 2-pixel outline enabled, rounded letters lose their curved tops — the outline forms a flat horizontal cap at the peak instead of following the arc. Vertical stems (h, d) look correct; the problem is specific to curved tops on glyphs like s, a, o, and n.
This appears to be an outline-shape bug, not normal Arial design.
Steps to reproduce
- Rasterizer: KernSmith.Rasterizers.FreeType
- Font: Arial
- Size: 24
- Outline thickness: 2
- Generate text containing rounded glyphs — e.g. "Shadow and"
or "ason"
- Zoom in on
s, a, o, n peaks
Expected behavior
The outline should follow the curved top of rounded glyphs, matching the underlying glyph silhouette.
Actual behavior
The outline at the top of rounded glyphs is flattened into a straight horizontal segment several pixels wide. Annotated zoom comparisons show the cap on s and a clearly; o and n show the same pattern.
Screenshots
Screenshots will be added in a follow-up comment (zoomed, with annotations on affected peaks).
Environment
- OS: Windows 10
- Rasterizer: KernSmith.Rasterizers.FreeType
- Reproduced in: KernSmith UI
Notes for investigation
Likely related to OutlineEffect EDT binarization — alpha is thresholded at >= 32 before the distance transform, which can turn a graduated anti-aliased peak into a flat binarized row; the 2px outline then traces that flattened silhouette:
// OutlineEffect.cs
binaryAlpha[i] = expandedAlpha[i] >= 32 ? (byte)255 : (byte)0;
OutlinePostProcessor uses a different path (EDT on raw alpha, no binarization) and may be worth comparing.
LayeredRenderingTests checks outline sizing but does not assert outline shape integrity on curved glyphs.
Possible regression test
Generate ason at size 24 with outline=2 via FreeType; sample pixels just outside the glyph peak on s/o and assert the outline boundary is not a perfectly flat horizontal run (or compare against a golden image of outline-only output).
Description
With a 2-pixel outline enabled, rounded letters lose their curved tops — the outline forms a flat horizontal cap at the peak instead of following the arc. Vertical stems (
h,d) look correct; the problem is specific to curved tops on glyphs likes,a,o, andn.This appears to be an outline-shape bug, not normal Arial design.
Steps to reproduce
or "ason"s,a,o,npeaksExpected behavior
The outline should follow the curved top of rounded glyphs, matching the underlying glyph silhouette.
Actual behavior
The outline at the top of rounded glyphs is flattened into a straight horizontal segment several pixels wide. Annotated zoom comparisons show the cap on
sandaclearly;oandnshow the same pattern.Screenshots
Screenshots will be added in a follow-up comment (zoomed, with annotations on affected peaks).
Environment
Notes for investigation
Likely related to
OutlineEffectEDT binarization — alpha is thresholded at>= 32before the distance transform, which can turn a graduated anti-aliased peak into a flat binarized row; the 2px outline then traces that flattened silhouette:OutlinePostProcessoruses a different path (EDT on raw alpha, no binarization) and may be worth comparing.LayeredRenderingTestschecks outline sizing but does not assert outline shape integrity on curved glyphs.Possible regression test
Generate
asonat size 24 with outline=2 via FreeType; sample pixels just outside the glyph peak ons/oand assert the outline boundary is not a perfectly flat horizontal run (or compare against a golden image of outline-only output).