Bug 1427480 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. r=lsalzman
authorJonathan Kew <jkew@mozilla.com>
Tue, 20 Mar 2018 18:02:18 +0000
changeset 409126 74ffac5bc156c537ff4b1cc3d98dbb2c61b3127d
parent 409071 a760e111f2f157fbb18e66117f026ca298d4343e
child 409127 3ac9277c6aa998205da26e03e7facc7c1e9eca5b
push id33676
push usertoros@mozilla.com
push dateWed, 21 Mar 2018 10:03:44 +0000
treeherdermozilla-central@e636edf00e6f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1427480
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1427480 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. r=lsalzman
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);