Evas font-engine: Round the fractional coords (instead of floor).

SVN revision: 56508
This commit is contained in:
Tom Hacohen 2011-01-30 10:42:07 +00:00
parent 32fd296bde
commit 99c8c7bb2f
2 changed files with 12 additions and 6 deletions

View File

@ -90,16 +90,19 @@
/*FIXME: doc */ /*FIXME: doc */
#define EVAS_FONT_WALK_OT_X_OFF \ #define EVAS_FONT_WALK_OT_X_OFF \
(EVAS_FONT_OT_X_OFF_GET( \ (EVAS_FONT_ROUND_26_6_TO_INT( \
intl_props->ot_data->items[char_index]) >> 6) EVAS_FONT_OT_X_OFF_GET( \
intl_props->ot_data->items[char_index])))
#define EVAS_FONT_WALK_OT_Y_OFF \ #define EVAS_FONT_WALK_OT_Y_OFF \
(EVAS_FONT_OT_Y_OFF_GET( \ (EVAS_FONT_ROUND_26_6_TO_INT( \
intl_props->ot_data->items[char_index]) >> 6) EVAS_FONT_OT_Y_OFF_GET( \
intl_props->ot_data->items[char_index])))
#define EVAS_FONT_WALK_OT_X_BEAR (fg->glyph_out->left) #define EVAS_FONT_WALK_OT_X_BEAR (fg->glyph_out->left)
#define EVAS_FONT_WALK_OT_Y_BEAR (fg->glyph_out->top) #define EVAS_FONT_WALK_OT_Y_BEAR (fg->glyph_out->top)
#define EVAS_FONT_WALK_OT_X_ADV \ #define EVAS_FONT_WALK_OT_X_ADV \
(EVAS_FONT_OT_X_ADV_GET( \ (EVAS_FONT_ROUND_26_6_TO_INT( \
intl_props->ot_data->items[char_index]) >> 6) EVAS_FONT_OT_X_ADV_GET( \
intl_props->ot_data->items[char_index])))
#define EVAS_FONT_WALK_OT_WIDTH (fg->glyph_out->bitmap.width) #define EVAS_FONT_WALK_OT_WIDTH (fg->glyph_out->bitmap.width)
#define EVAS_FONT_WALK_OT_POS \ #define EVAS_FONT_WALK_OT_POS \
(EVAS_FONT_OT_POS_GET( \ (EVAS_FONT_OT_POS_GET( \

View File

@ -37,6 +37,9 @@ void evas_common_font_int_reload(RGBA_Font_Int *fi);
# define OTUNLOCK() # define OTUNLOCK()
# endif # endif
# define EVAS_FONT_ROUND_26_6_TO_INT(x) \
(((0x3F & x) > 31) ? ((x >> 6) + 1) : (x >> 6))
# define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \ # define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \
((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \ ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \
((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \ ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \