forked from enlightenment/efl
Evas font-engine: Fixed invisible character handling in the OT walker. Renamed internal var gl in the default walker to _gl, a less common var name.
SVN revision: 56458
This commit is contained in:
parent
f4a6807c4d
commit
3b88692aa7
|
@ -48,7 +48,7 @@
|
||||||
* which is the current index in the text. This macro exposes (inside
|
* which is the current index in the text. This macro exposes (inside
|
||||||
* the loop) the following vars:
|
* the loop) the following vars:
|
||||||
* adv - advancement
|
* adv - advancement
|
||||||
* gl - the current unicode code point
|
* _gl - the current unicode code point
|
||||||
* bear_x, bear_y, width - info about the bitmap
|
* bear_x, bear_y, width - info about the bitmap
|
||||||
* pen_x, pen_y - (also available outside of the loop, but updated here)
|
* pen_x, pen_y - (also available outside of the loop, but updated here)
|
||||||
* fg - the font glyph.
|
* fg - the font glyph.
|
||||||
|
@ -84,9 +84,9 @@
|
||||||
{ \
|
{ \
|
||||||
FT_UInt index; \
|
FT_UInt index; \
|
||||||
RGBA_Font_Glyph *fg; \
|
RGBA_Font_Glyph *fg; \
|
||||||
int gl, kern; \
|
int _gl, kern; \
|
||||||
gl = *text; \
|
_gl = *text; \
|
||||||
if (gl == 0) break;
|
if (_gl == 0) break;
|
||||||
/**
|
/**
|
||||||
* @def EVAS_FONT_WALK_DEFAULT_TEXT_LOGICAL_START
|
* @def EVAS_FONT_WALK_DEFAULT_TEXT_LOGICAL_START
|
||||||
* @internal
|
* @internal
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
* which is the current index in the text. This macro exposes (inside
|
* which is the current index in the text. This macro exposes (inside
|
||||||
* the loop) the following vars:
|
* the loop) the following vars:
|
||||||
* adv - advancement
|
* adv - advancement
|
||||||
* gl - the current unicode code point
|
* _gl - the current unicode code point
|
||||||
* bear_x, bear_y, width - info about the bitmap
|
* bear_x, bear_y, width - info about the bitmap
|
||||||
* pen_x, pen_y - (also available outside of the loop, but updated here)
|
* pen_x, pen_y - (also available outside of the loop, but updated here)
|
||||||
* fg - the font glyph.
|
* fg - the font glyph.
|
||||||
|
@ -114,9 +114,9 @@
|
||||||
{ \
|
{ \
|
||||||
FT_UInt index; \
|
FT_UInt index; \
|
||||||
RGBA_Font_Glyph *fg; \
|
RGBA_Font_Glyph *fg; \
|
||||||
int gl, kern; \
|
int _gl, kern; \
|
||||||
gl = *text; \
|
_gl = *text; \
|
||||||
if (gl == 0) break;
|
if (_gl == 0) break;
|
||||||
|
|
||||||
/*FIXME: doc */
|
/*FIXME: doc */
|
||||||
#define EVAS_FONT_WALK_DEFAULT_X_OFF (kern)
|
#define EVAS_FONT_WALK_DEFAULT_X_OFF (kern)
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
* @see EVAS_FONT_WALK_DEFAULT_TEXT_END
|
* @see EVAS_FONT_WALK_DEFAULT_TEXT_END
|
||||||
*/
|
*/
|
||||||
#define EVAS_FONT_WALK_DEFAULT_TEXT_WORK(is_visual) \
|
#define EVAS_FONT_WALK_DEFAULT_TEXT_WORK(is_visual) \
|
||||||
index = evas_common_font_glyph_search(fn, &fi, gl); \
|
index = evas_common_font_glyph_search(fn, &fi, _gl); \
|
||||||
LKL(fi->ft_mutex); \
|
LKL(fi->ft_mutex); \
|
||||||
fg = evas_common_font_int_cache_glyph_get(fi, index); \
|
fg = evas_common_font_int_cache_glyph_get(fi, index); \
|
||||||
if (!fg) \
|
if (!fg) \
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
kern = 0; \
|
kern = 0; \
|
||||||
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl)) \
|
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl)) \
|
||||||
{ \
|
{ \
|
||||||
visible = 0; \
|
visible = 0; \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -514,9 +514,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
|
||||||
{
|
{
|
||||||
int chr_x, chr_y, chr_w;
|
int chr_x, chr_y, chr_w;
|
||||||
|
|
||||||
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
EVAS_FONT_WALK_OT_TEXT_WORK(EINA_TRUE);
|
EVAS_FONT_WALK_OT_TEXT_WORK(EINA_TRUE);
|
||||||
|
|
||||||
if (dc->font_ext.func.gl_new)
|
if (dc->font_ext.func.gl_new)
|
||||||
|
@ -666,9 +663,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
|
||||||
{
|
{
|
||||||
int chr_x, chr_y, chr_w;
|
int chr_x, chr_y, chr_w;
|
||||||
|
|
||||||
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
EVAS_FONT_WALK_DEFAULT_TEXT_WORK(EINA_TRUE);
|
EVAS_FONT_WALK_DEFAULT_TEXT_WORK(EINA_TRUE);
|
||||||
|
|
||||||
if (dc->font_ext.func.gl_new)
|
if (dc->font_ext.func.gl_new)
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
{ \
|
{ \
|
||||||
FT_UInt index; \
|
FT_UInt index; \
|
||||||
RGBA_Font_Glyph *fg; \
|
RGBA_Font_Glyph *fg; \
|
||||||
int gl, kern; \
|
int kern; \
|
||||||
gl = 0; /* FIXME: hack */
|
|
||||||
/**
|
/**
|
||||||
* @def EVAS_FONT_WALK_OT_TEXT_LOGICAL_START
|
* @def EVAS_FONT_WALK_OT_TEXT_LOGICAL_START
|
||||||
* @internal
|
* @internal
|
||||||
|
@ -78,8 +77,7 @@
|
||||||
{ \
|
{ \
|
||||||
FT_UInt index; \
|
FT_UInt index; \
|
||||||
RGBA_Font_Glyph *fg; \
|
RGBA_Font_Glyph *fg; \
|
||||||
int gl, kern; \
|
int kern; \
|
||||||
gl = 0; /* FIXME: hack */
|
|
||||||
|
|
||||||
/*FIXME: doc */
|
/*FIXME: doc */
|
||||||
#define EVAS_FONT_WALK_OT_X_OFF \
|
#define EVAS_FONT_WALK_OT_X_OFF \
|
||||||
|
@ -133,7 +131,7 @@
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
kern = 0; \
|
kern = 0; \
|
||||||
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl)) \
|
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(text[EVAS_FONT_WALK_OT_POS])) \
|
||||||
{ \
|
{ \
|
||||||
visible = 0; \
|
visible = 0; \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in New Issue