diff --git a/src/font.c b/src/font.c index 43993c1..a453865 100644 --- a/src/font.c +++ b/src/font.c @@ -818,14 +818,14 @@ double textLayoutGetHeight(TextLayout layout) { double textLayoutGetTopAscenderLine(TextLayout layout) { HeliDrawingState *drawingState = heliDrawingGetState(); double fontScale = drawingState->fontSize/FONT_BASE_SIZE; - return (layout->lines->y - layout->lines->xheight)*fontScale; + return (layout->lines->y - layout->lines->ascender)*fontScale; } double textLayoutGetTopXLine(TextLayout layout) { HeliDrawingState *drawingState = heliDrawingGetState(); double fontScale = drawingState->fontSize/FONT_BASE_SIZE; - return (layout->lines->y - layout->lines->ascender)*fontScale; + return (layout->lines->y - layout->lines->xheight)*fontScale; }