forked from enlightenment/efl
Evas font-engine: Fixed some issues with the git rebase I just did, should now compile correctly.
SVN revision: 56465
This commit is contained in:
parent
48b3a796a5
commit
b53ded56ed
|
@ -69,101 +69,4 @@ void evas_common_font_int_reload(RGBA_Font_Int *fi);
|
||||||
(void) _len; /* We don't have to use it */ \
|
(void) _len; /* We don't have to use it */ \
|
||||||
(void) pen_y; /* Sometimes it won't be used */
|
(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 */
|
#endif /* !_EVAS_FONT_PRIVATE_H */
|
||||||
|
|
|
@ -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);
|
if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn);
|
||||||
evas_common_font_int_use_trim();
|
evas_common_font_int_use_trim();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* h & v advance
|
/* h & v advance
|
||||||
* BiDi handling: We receive the shaped string + other props from intl_props,
|
* BiDi handling: We receive the shaped string + other props from intl_props,
|
||||||
|
|
Loading…
Reference in New Issue