summaryrefslogtreecommitdiff
path: root/src/cairo-ft-font.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2003-12-15 17:26:25 +0000
committerCarl Worth <cworth@cworth.org>2003-12-15 17:26:25 +0000
commit0095dcb49d5a10f8ab62aeff1809587250a09575 (patch)
tree670f7079daf3786ee423c6d283cfb48780ef082c /src/cairo-ft-font.c
parent1cd1330aa3967fb57a646a60e4fcb478c631cda6 (diff)
Fix minor errors in fixed/floating-point conversion.
Diffstat (limited to 'src/cairo-ft-font.c')
-rw-r--r--src/cairo-ft-font.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index ac88412f..4d657a9e 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -40,12 +40,10 @@ typedef struct {
} cairo_ft_font_t;
-#define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 63.0))
-#define DOUBLE_FROM_26_6(t) (((double)((t) >> 6)) \
- + ((double)((t) & 0x3F) / 63.0))
-#define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65535.0))
-#define DOUBLE_FROM_16_16(t) (((double)((t) >> 16)) \
- + ((double)((t) & 0xFFFF) / 65535.0))
+#define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 64.0))
+#define DOUBLE_FROM_26_6(t) ((double)(t) / 64.0)
+#define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
+#define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)
/* implement the platform-specific interface */