From b53ded56ed4007ae4444e72d4d07ddaa31ba139d Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 30 Jan 2011 10:37:46 +0000 Subject: [PATCH] Evas font-engine: Fixed some issues with the git rebase I just did, should now compile correctly. SVN revision: 56465 --- .../lib/engines/common/evas_font_private.h | 97 ------------------- .../src/lib/engines/common/evas_font_query.c | 3 +- 2 files changed, 1 insertion(+), 99 deletions(-) diff --git a/legacy/evas/src/lib/engines/common/evas_font_private.h b/legacy/evas/src/lib/engines/common/evas_font_private.h index b98d8ab138..d3336d1d5c 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_private.h +++ b/legacy/evas/src/lib/engines/common/evas_font_private.h @@ -69,101 +69,4 @@ void evas_common_font_int_reload(RGBA_Font_Int *fi); (void) _len; /* We don't have to use it */ \ (void) pen_y; /* Sometimes it won't be used */ -<<<<<<< HEAD -/** - * @def EVAS_FONT_WALK_TEXT_START - * @internal - * This runs through the variable text while updating char_index, - * which is the current index in the text. This macro exposes (inside - * the loop) the following vars: - * adv - advancement - * gl - the current unicode code point - * bear_x, bear_y, width - info about the bitmap - * pen_x, pen_y - (also available outside of the loop, but updated here) - * fg - the font glyph. - * index, prev_index - font indexes. - * Does not end with a ; - * @see EVAS_FONT_WALK_TEXT_INIT - * @see EVAS_FONT_WALK_TEXT_WORK - * @see EVAS_FONT_WALK_TEXT_END - */ -#define EVAS_FONT_WALK_TEXT_START() \ - do \ - { \ - int adv; \ - int visible; \ - prev_index = 0; \ - for (char_index = 0 ; *text ; text++, char_index++) \ - { \ - FT_UInt index; \ - RGBA_Font_Glyph *fg; \ - int gl, kern; \ - int bear_x, bear_y, width; \ - gl = *text; \ - if (gl == 0) break; - -/** - * @def EVAS_FONT_WALK_TEXT_WORK - * @internal - * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START - * according to the current positing in the walk. - * @see EVAS_FONT_WALK_TEXT_START - * @see EVAS_FONT_WALK_TEXT_INIT - * @see EVAS_FONT_WALK_TEXT_END - */ -#define EVAS_FONT_WALK_TEXT_WORK(is_visual) \ - index = evas_common_font_glyph_search(fn, &fi, gl); \ - LKL(fi->ft_mutex); \ - fg = evas_common_font_int_cache_glyph_get(fi, index); \ - if (!fg) \ - { \ - LKU(fi->ft_mutex); \ - continue; \ - } \ - kern = 0; \ - if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl)) \ - { \ - adv = width = bear_x = bear_y = 0; \ - visible = 0; \ - } \ - else \ - { \ - bear_x = fg->glyph_out->left; \ - bear_y = fg->glyph_out->top; \ - adv = fg->glyph->advance.x >> 16; \ - width = fg->glyph_out->bitmap.width; \ - visible = 1; \ - } \ - /* hmmm kerning means i can't sanely do my own cached metric */ \ - /* tables! grrr - this means font face sharing is kinda... not */ \ - /* an option if you want performance */ \ - if ((use_kerning) && (prev_index) && (index) && \ - (pface == fi->src->ft.face)) \ - { \ - EVAS_FONT_UPDATE_KERN(is_visual); \ - } \ - \ - pface = fi->src->ft.face; \ - LKU(fi->ft_mutex); \ - -/** - * @def EVAS_FONT_WALK_TEXT_END - * @internal - * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ; - * @see EVAS_FONT_WALK_TEXT_START - * @see EVAS_FONT_WALK_TEXT_INIT - * @see EVAS_FONT_WALK_TEXT_WORK - */ -#define EVAS_FONT_WALK_TEXT_END() \ - if (visible) \ - { \ - pen_x += adv; \ - } \ - prev_index = index; \ - } \ - } \ - while(0) - -======= ->>>>>>> Evas: Multiple changes that all relate to the Harfbuzz integration: #endif /* !_EVAS_FONT_PRIVATE_H */ 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 ce75e9ae51..fbe4dd0a11 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -182,7 +182,6 @@ evas_common_font_query_size(RGBA_Font *fn, const Eina_Unicode *text, const Evas_ if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn); evas_common_font_int_use_trim(); } -} /* h & v advance * BiDi handling: We receive the shaped string + other props from intl_props, @@ -384,7 +383,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c end: evas_common_font_int_use_trim(); - return ret_val; + return ret_val; } /* x y w h for pen at char pos for null it returns the position right after