From ecc49c84a833138006f9282bd8e365cf23b7845d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 18 Aug 2015 21:04:06 +0200 Subject: [PATCH] Make stb font_size similar to our other font renderers. Fixes #2047 --- gfx/drivers_font_renderer/stb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx/drivers_font_renderer/stb.c b/gfx/drivers_font_renderer/stb.c index d27decca0b..76b196b6b6 100644 --- a/gfx/drivers_font_renderer/stb.c +++ b/gfx/drivers_font_renderer/stb.c @@ -137,6 +137,9 @@ static void *font_renderer_stb_init(const char *font_path, float font_size) stbtt_fontinfo info; stb_font_renderer_t *self = (stb_font_renderer_t*) calloc(1, sizeof(*self)); + /* See https://github.com/nothings/stb/blob/master/stb_truetype.h#L539 */ + font_size = STBTT_POINT_SIZE(font_size); + /* prevent warnings */ (void)rect_width_compare;