summaryrefslogtreecommitdiff
path: root/src/win32/cairo-win32-font.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-12 11:25:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-15 14:37:11 +0000
commitae3319890eacd1c8282ca6df7b263ac74abb5f8d (patch)
tree16b1f4bab9bcd4cbb13f5e15b01696c788d46203 /src/win32/cairo-win32-font.c
parent92c0b37d04f9df8df53a455c8e8dda1946c84c87 (diff)
downloadcairo-ae3319890eacd1c8282ca6df7b263ac74abb5f8d.tar.gz
win32: Rebase on the new compositor infrastructure
Try and undo all the damage that has acrued over the years by plugging into the compositor pipeline. References: https://bugs.freedesktop.org/show_bug.cgi?id=42739 References: https://bugs.freedesktop.org/show_bug.cgi?id=42821 References: https://bugs.freedesktop.org/show_bug.cgi?id=33081 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/win32/cairo-win32-font.c')
-rw-r--r--src/win32/cairo-win32-font.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c
index 73fc052d7..ed171c29e 100644
--- a/src/win32/cairo-win32-font.c
+++ b/src/win32/cairo-win32-font.c
@@ -236,13 +236,15 @@ _compute_transform (cairo_win32_scaled_font_t *scaled_font,
if (status)
return status;
- scaled_font->logical_size = _cairo_lround (WIN32_FONT_LOGICAL_SCALE *
- scaled_font->y_scale);
- scaled_font->logical_scale = WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale;
+ scaled_font->logical_size =
+ _cairo_lround (WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale);
+ scaled_font->logical_scale =
+ WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale;
}
cairo_matrix_scale (&scaled_font->logical_to_device,
- 1.0 / scaled_font->logical_scale, 1.0 / scaled_font->logical_scale);
+ 1.0 / scaled_font->logical_scale,
+ 1.0 / scaled_font->logical_scale);
scaled_font->device_to_logical = scaled_font->logical_to_device;
@@ -1049,7 +1051,6 @@ _cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_f
extents.y_bearing = (- extents.y_bearing - extents.height);
extents.y_advance = - extents.y_advance;
}
-
} else {
/* For all other transformations, we use the design metrics
* of the font.
@@ -1295,6 +1296,7 @@ _draw_glyphs_on_surface (cairo_win32_surface_t *surface,
return status;
}
+#if 0
/* Duplicate the green channel of a 4-channel mask in the alpha channel, then
* invert the whole mask.
*/
@@ -1360,6 +1362,7 @@ _compute_a8_mask (cairo_win32_surface_t *mask_surface)
return &image8->base;
}
+#endif
static cairo_int_status_t
_cairo_win32_scaled_font_glyph_init (void *abstract_font,
@@ -1656,9 +1659,9 @@ _cairo_win32_scaled_font_is_synthetic (void *abstract_font)
}
static cairo_int_status_t
-_cairo_win32_scaled_font_index_to_glyph_name (void *abstract_font,
+_cairo_win32_scaled_font_index_to_glyph_name (void *abstract_font,
char **glyph_names,
- int num_glyph_names,
+ int num_glyph_names,
unsigned long glyph_index,
unsigned long *glyph_array_index)
{
@@ -1688,7 +1691,7 @@ _cairo_win32_scaled_font_index_to_glyph_name (void *abstract_font,
*glyph_array_index = scaled_font->type1_notdef_index;
else if (glyph_index <= scaled_font->type1_notdef_index)
*glyph_array_index = glyph_index - 1;
- else if (glyph_index < num_glyph_names)
+ else if (glyph_index < (unsigned long)num_glyph_names)
*glyph_array_index = glyph_index;
else
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -1756,8 +1759,12 @@ _cairo_win32_scaled_font_init_glyph_surface (cairo_win32_scaled_font_t *scaled_f
GdiFlush();
+#if 0
image = _compute_a8_mask (surface);
status = image->status;
+#else
+ status = CAIRO_STATUS_NO_MEMORY;
+#endif
if (status)
goto FAIL;