From f2b945b53d471e2cbbdc0d2565968bfaa4bee3ca Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Mon, 18 Jun 2007 16:47:20 +0000 Subject: [PATCH] Find chr_x the same way as in the other functions. The main loop is very similar in many functions and should be refactored. SVN revision: 30389 --- legacy/evas/src/lib/engines/common/evas_font_query.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/engines/common/evas_font_query.c b/legacy/evas/src/lib/engines/common/evas_font_query.c index 3761159404..4ff9741a7f 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -52,7 +52,8 @@ evas_common_font_query_size(RGBA_Font *fn, const char *text, int *w, int *h) fg = evas_common_font_int_cache_glyph_get(fi, index); if (!fg) continue; - chr_x = (pen_x + (fg->glyph_out->left)); + if (kern < 0) kern = 0; + chr_x = ((pen_x - kern) + (fg->glyph_out->left)); chr_y = (pen_y + (fg->glyph_out->top)); // chr_w = fg->glyph_out->bitmap.width; chr_w = fg->glyph_out->bitmap.width + kern;