summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_font_private.h
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-10-10 06:07:38 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-10-10 06:07:38 +0000
commitaad2041e5522797bb850cf6bc210f0b49c47e8c6 (patch)
tree979b4b1a96e0a0591ca4136cd9ee2c872ea89fdc /legacy/evas/src/lib/engines/common/evas_font_private.h
parentf91826870daf36209f642cf3b86362f2b8784e97 (diff)
fix font rounding in evas to round and not floor - fixes some rare
font sizing issues. SVN revision: 77688
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_private.h15
1 files changed, 15 insertions, 0 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 2a2a382f89..c50cbb0c46 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_private.h
+++ b/legacy/evas/src/lib/engines/common/evas_font_private.h
@@ -46,5 +46,20 @@ void evas_common_font_int_reload(RGBA_Font_Int *fi);
46 ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \ 46 ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \
47 ) 47 )
48 48
49# if 1
50// do proper round (up or down like 1.4 -> 1 and 1.6 -> 2 etc
51# define FONT_MERTIC_CONV(val, dv, scale) \
52 (((long long)((val) * (scale)) + (long long)((dv) * (dv) / 2LL)) \
53 / (long long)((dv) * (dv)))
54# define FONT_METRIC_ROUNDUP(val) \
55 (((val) + 31) >> 6)
56# else
57// truncate/round down
58# define FONT_MERTIC_CONV(val, dv, scale) \
59 (((val) * (scale)) / ((dv) * (dv)))
60# define FONT_METRIC_ROUNDUP(val) \
61 ((val) >> 6)
62# endif
63
49# include "evas_font_default_walk.x" 64# include "evas_font_default_walk.x"
50#endif /* !_EVAS_FONT_PRIVATE_H */ 65#endif /* !_EVAS_FONT_PRIVATE_H */