From 5dddd8cab8b2ed688898748952b070b3899dd7ed Mon Sep 17 00:00:00 2001 From: Tim Ittermann Date: Fri, 22 Mar 2024 08:20:37 +0100 Subject: [PATCH] Fixing Textbaseline --- Layouting/TextElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Layouting/TextElement.cs b/Layouting/TextElement.cs index b729fd8..b217912 100644 --- a/Layouting/TextElement.cs +++ b/Layouting/TextElement.cs @@ -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); }