Bug 1427480 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. r=lsalzman, a=RyanVM
authorJonathan Kew <jkew@mozilla.com>
Tue, 20 Mar 2018 18:02:18 +0000
changeset 463110 4aee8de5790b1675c5c776c3616976f11730a74c
parent 463109 eead32dddd0222c20c4527cbda8639a9cbcc7e63
child 463111 7b34158d42f3f8c4ce347b3d790dcefd26e613e3
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman, RyanVM
bugs1427480
milestone60.0
Bug 1427480 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. r=lsalzman, a=RyanVM
gfx/cairo/cairo/src/cairo-ft-font.c
gfx/cairo/max-font-size.patch
--- a/gfx/cairo/cairo/src/cairo-ft-font.c
+++ b/gfx/cairo/cairo/src/cairo-ft-font.c
@@ -98,17 +98,17 @@ static setLcdFilterFunc setLcdFilter;
 #define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
 #define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)
 
 /* 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
  */
-#define MAX_FONT_SIZE 1000
+#define MAX_FONT_SIZE 2000
 
 extern FT_Face mozilla_NewFTFace(FT_Library aFTLibrary, const char* aFileName, int aFaceIndex);
 extern FT_Face mozilla_NewFTFaceFromData(FT_Library aFTLibrary, const uint8_t* aData, size_t aDataSize, int aFaceIndex);
 extern void mozilla_ReleaseFTFace(FT_Face aFace);
 extern void mozilla_LockFTLibrary(FT_Library aFTLibrary);
 extern void mozilla_UnlockFTLibrary(FT_Library aFTLibrary);
 
 /**
--- a/gfx/cairo/max-font-size.patch
+++ b/gfx/cairo/max-font-size.patch
@@ -3,17 +3,17 @@ diff --git a/gfx/cairo/cairo/src/cairo-f
 +++ b/gfx/cairo/cairo/src/cairo-ft-font.c
 @@ -63,6 +63,10 @@
  /* 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
 + */
-+#define MAX_FONT_SIZE 1000
++#define MAX_FONT_SIZE 2000
  
  /*
   * The simple 2x2 matrix is converted into separate scale and shape
 @@ -682,9 +686,11 @@ _cairo_ft_unscaled_font_set_scale (cairo
      FT_Set_Transform(unscaled->face, &mat, NULL);
  
      if ((unscaled->face->face_flags & FT_FACE_FLAG_SCALABLE) != 0) {
 +	double x_scale = MIN(sf.x_scale, MAX_FONT_SIZE);