fix vertical alignment
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1cba7f3faa
commit
6266adb393
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue