summaryrefslogtreecommitdiff
path: root/src/cairo-win32-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-05-23 19:57:48 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-05-23 20:03:49 -0400
commitcf473f4a75ca0d3c815222287d7c144e72de5add (patch)
tree7c81324102f4fbaa87c06ed9809dc43b1873501c /src/cairo-win32-font.c
parente66e198ab04f2e19093aad4ed9f9c24e2756b8a7 (diff)
[cairo-xlib] Fix show_glyphs when failing to upload a glyph
Originally reported here: http://lists.cairographics.org/archives/cairo/2008-May/014032.html and analyized later in the thread. Change (font and surface) backend show_glyphs() API to take a int *remaining_glyphs argument. It's used to communicate to the caller, by way of setting remaining_glyphs and returning INT_STATUS_UNSUPPORTED, that some of the glyphs were shown but not the others. The xlib backend now correctly uses this to handle failure to upload a glyph to the server. So the large-font test passes now. An alternative approach could be to add some public value for glyphs indices that are not shown. -1 perhaps (the xlib backend already uses that value internally). Then instead of remaining_glyphs, a backend could simply set glyph indices of glyphs shown to that -1 value.
Diffstat (limited to 'src/cairo-win32-font.c')
-rw-r--r--src/cairo-win32-font.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 919b6f88..74b072c7 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -1320,7 +1320,8 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font,
unsigned int width,
unsigned int height,
cairo_glyph_t *glyphs,
- int num_glyphs)
+ int num_glyphs,
+ int *remaining_glyphs)
{
cairo_win32_scaled_font_t *scaled_font = abstract_font;
cairo_win32_surface_t *surface = (cairo_win32_surface_t *)generic_surface;