diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c index 570e2da30..84d7d0e71 100644 --- a/gfx/cairo/cairo/src/cairo-ft-font.c +++ b/gfx/cairo/cairo/src/cairo-ft-font.c @@ -100,9 +100,12 @@ static setLcdFilterFunc setLcdFilter; /* This is the max number of FT_face objects we keep open at once */ #define MAX_OPEN_FACES 10 -/* This is the maximum font size we allow to be passed to FT_Set_Char_Size + +/* This is the (arbitrary) maximum font size we allow to be passed to + FT_Set_Char_Size. + Note: This should be equal to FONT_MAX_SIZE in thebes/gfxFont.h */ -#define MAX_FONT_SIZE 1000 +#define MAX_FONT_SIZE 2000 /** * SECTION:cairo-ft diff --git a/gfx/cairo/cairo/src/cairo-path-bounds.c b/gfx/cairo/cairo/src/cairo-path-bounds.c index 8ca80fa13..9b7e1f966 100644 --- a/gfx/cairo/cairo/src/cairo-path-bounds.c +++ b/gfx/cairo/cairo/src/cairo-path-bounds.c @@ -139,6 +139,16 @@ _cairo_path_bounder_curve_to (void *closure, static cairo_status_t _cairo_path_bounder_close_path (void *closure) { + // XXXMC: This addition of a closure point isn't strictly needed but + // if our clipping extents code changes then this might cause problems + // if the extra point isn't added (in case of 0-length paths). + cairo_path_bounder_t *bounder = closure; + + if (bounder->has_initial_point) { + _cairo_path_bounder_add_point (bounder, &bounder->current_point); + bounder->has_initial_point = FALSE; + } + return CAIRO_STATUS_SUCCESS; } diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c index a6df34ae1..bc636cd36 100644 --- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c +++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c @@ -1298,6 +1298,9 @@ _cairo_win32_printing_surface_stroke (void *abstract_surface, } if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { + /* Win32 does not support more than 16 elements in the dash array. */ + if (style->num_dashes > 16) + return CAIRO_INT_STATUS_UNSUPPORTED; /* Win32 does not support a dash offset. */ if (style->num_dashes > 0 && style->dash_offset != 0.0) return CAIRO_INT_STATUS_UNSUPPORTED; diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c index 3a3d82989..803a0b240 100644 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c @@ -127,7 +127,7 @@ _cairo_win32_print_gdi_error (const char *context) 0, NULL)) { fprintf (stderr, "%s: Unknown GDI error", context); } else { - fwprintf (stderr, L"%s: %S", context, (wchar_t *)lpMsgBuf); + fprintf (stderr, L"%s: %S", context, (wchar_t *)lpMsgBuf); LocalFree (lpMsgBuf); } diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index b279f46a1..21bb40f4e 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -45,6 +45,7 @@ class gfxShapedWord; class gfxSkipChars; class gfxTextContextPaint; +// If you change this value, also change MAX_FONT_SIZE in cairo-ft-font.c to match #define FONT_MAX_SIZE 2000.0 #define NO_FONT_LANGUAGE_OVERRIDE 0