diff options
Diffstat (limited to 'src/cairoint.h')
-rw-r--r-- | src/cairoint.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cairoint.h b/src/cairoint.h index 29b844d3a..7c1000556 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -428,7 +428,10 @@ _cairo_hash_bytes (unsigned long hash, const void *bytes, unsigned int length); -#define _cairo_scaled_glyph_index(g) ((g)->hash_entry.hash) +/* We use bits 24-27 to store phases for subpixel positions */ +#define _cairo_scaled_glyph_index(g) ((g)->hash_entry.hash & 0xffffff) +#define _cairo_scaled_glyph_xphase(g) (int)(((g)->hash_entry.hash >> 24) & 3) +#define _cairo_scaled_glyph_yphase(g) (int)(((g)->hash_entry.hash >> 26) & 3) #define _cairo_scaled_glyph_set_index(g, i) ((g)->hash_entry.hash = (i)) #include "cairo-scaled-font-private.h" |