From 866bf9121e12e4039885abdc0cfa942352318b90 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 29 Dec 2002 01:49:07 +0000 Subject: [PATCH] oops.. return POSTION, not glyph value! SVN revision: 6525 --- legacy/evas/src/lib/engines/common/evas_font_query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 72ec516e15..883b45899b 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -186,11 +186,13 @@ evas_common_font_query_text_at_pos(RGBA_Font *fn, const char *text, int x, int y prev_index = 0; for (chr = 0; text[chr];) { + int pchr; FT_UInt index; RGBA_Font_Glyph *fg; int chr_x, chr_y, chr_w; int gl; - + + pchr = chr; gl = evas_common_font_utf8_get_next((unsigned char *)text, &chr); if (gl == 0) break; index = FT_Get_Char_Index(fn->ft.face, gl); @@ -217,7 +219,7 @@ evas_common_font_query_text_at_pos(RGBA_Font *fn, const char *text, int x, int y if (cy) *cy = - evas_common_font_max_ascent_get(fn); if (cw) *cw = chr_w; if (ch) *ch = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn); - return gl; + return pchr; } pen_x += fg->glyph->advance.x >> 8; prev_index = index;