import from UXP:

- Issue #3039 - Add closure point to bounds calculation. (42fc0af32)
- Issue #3039 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. (35164e286)
- Issue #3039 - Reapply bug 624198 fix that got lost in an upstream update. (dda2b7972)
- Issue #3039 - Don't try to pass a dash array of > 16 elements to ExtCreatePen. (3bb1c962e)
This commit is contained in:
2022-03-24 23:31:25 +08:00
parent 9a9f885584
commit 1bfb3a970c
5 changed files with 20 additions and 3 deletions
+5 -2
View File
@@ -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
+10
View File
@@ -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;
}
@@ -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;
+1 -1
View File
@@ -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);
}
+1
View File
@@ -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