diff --git a/src/font_render_capi.cpp b/src/font_render_capi.cpp index 4b2f3131..9423f5a9 100644 --- a/src/font_render_capi.cpp +++ b/src/font_render_capi.cpp @@ -21,6 +21,6 @@ int FontRendererDrawText(FontRenderer *fr_, RenColor *pixels, int width, int hei font_renderer_lcd *font_renderer = (font_renderer_lcd *) fr_; agg::rendering_buffer ren_buf((agg::int8u *) pixels, width, height, -pitch); const agg::rgba8 agg_color(color.r, color.g, color.b); - double new_x = font_renderer->render_text(ren_buf, (double) text_size, agg_color, (double) x, (double) y, text); + double new_x = font_renderer->render_text(ren_buf, (double) text_size, agg_color, (double) x, (double) (height - y), text); return int(new_x); } diff --git a/src/renderer.c b/src/renderer.c index 8c8cc7db..a2209f9f 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -335,9 +335,8 @@ void ren_draw_image(RenImage *image, RenRect *sub, int x, int y, RenColor color) int ren_draw_text(RenFont *font, const char *text, int x, int y, RenColor color) { SDL_Surface *surf = SDL_GetWindowSurface(window); - // FIXME: pixels are arranged in bgra order while AGG::fontrender use rgb RenColor *pixels = (RenColor*) surf->pixels; - return FontRendererDrawText(font->renderer, pixels, surf->w, surf->h, surf->pitch, text, font->height, x, y, color); + return FontRendererDrawText(font->renderer, pixels, surf->w, surf->h, surf->pitch, text, font->height * 0.8, x, y, color); #if 0 RenRect rect; const char *p = text;