diff --git a/src/Wellspring.c b/src/Wellspring.c index 2cb1f92..445a94a 100644 --- a/src/Wellspring.c +++ b/src/Wellspring.c @@ -615,7 +615,7 @@ static uint8_t Wellspring_Internal_TextBounds( float advance = 0; float sizeFactor = pixelSize / font->pixelsPerEm; - y += Wellspring_INTERNAL_GetVerticalAlignOffset(font, verticalAlignment, sizeFactor * font->scale); + y -= Wellspring_INTERNAL_GetVerticalAlignOffset(font, verticalAlignment, sizeFactor * font->scale); for (i = 0; i < strLengthInBytes; i += 1) { @@ -755,7 +755,7 @@ uint8_t Wellspring_AddToTextBatch( float sizeFactor = pixelSize / font->pixelsPerEm; float x = 0, y = 0; - y += Wellspring_INTERNAL_GetVerticalAlignOffset(font, verticalAlignment, sizeFactor * font->scale); + y -= Wellspring_INTERNAL_GetVerticalAlignOffset(font, verticalAlignment, sizeFactor * font->scale); /* FIXME: If we horizontally align, we have to decode and process glyphs twice, very inefficient. */ if (horizontalAlignment == WELLSPRING_HORIZONTALALIGNMENT_RIGHT)