Merge pull request #8560 from jdgleaver/font-alignment-2

(Menu Widgets) Fix text alignment issues for ctr, metal and vita2d drivers
This commit is contained in:
Twinaphex 2019-04-08 16:25:17 +02:00 committed by GitHub
commit e6efc02457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -215,8 +215,8 @@ static void ctr_font_render_line(
width = glyph->width;
height = glyph->height;
v->x0 = x + off_x + delta_x * scale;
v->y0 = y + off_y + delta_y * scale;
v->x0 = x + (off_x + delta_x) * scale;
v->y0 = y + (off_y + delta_y) * scale;
v->u0 = tex_x;
v->v0 = tex_y;
v->x1 = v->x0 + width * scale;

View File

@ -298,8 +298,8 @@ static INLINE void write_quad6(SpriteVertex *pv,
height = glyph->height;
write_quad6(v,
(x + off_x + delta_x * scale) * inv_win_width,
(y + off_y + delta_y * scale) * inv_win_height,
(x + (off_x + delta_x) * scale) * inv_win_width,
(y + (off_y + delta_y) * scale) * inv_win_height,
width * scale * inv_win_width,
height * scale * inv_win_height,
tex_x * inv_tex_size_x,

View File

@ -209,8 +209,8 @@ static void vita2d_font_render_line(
}
vita2d_draw_texture_tint_part_scale(font->texture,
x + off_x + delta_x * scale,
y + off_y + delta_y * scale,
x + (off_x + delta_x) * scale,
y + (off_y + delta_y) * scale,
tex_x, tex_y, width, height,
scale,
scale,