Skip to content

Commit

Permalink
Fixing Textbaseline
Browse files Browse the repository at this point in the history
  • Loading branch information
timia2109 committed Mar 22, 2024
1 parent 5b229c2 commit 5dddd8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Layouting/TextElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class TextElement(string content, SKPaint paint) : Element
public override void Draw(DrawContext drawContext)
{
var point = drawContext.StartPoint;
point.Y += paint.TextSize * 0.85f;
point.Y -= paint.FontMetrics.Ascent;

drawContext.Canvas.DrawText(content, point, paint);
}
Expand Down

0 comments on commit 5dddd8c

Please sign in to comment.