Title: [148794] trunk/Tools
Revision
148794
Author
[email protected]
Date
2013-04-20 12:22:59 -0700 (Sat, 20 Apr 2013)

Log Message

[GTK] Fix baseline positioning issue by updating Freetype
https://bugs.webkit.org/show_bug.cgi?id=106775

Reviewed by Martin Robinson.

* gtk/jhbuild.modules: Bump the Freetype Jhbuild dependency to 2.4.11.
* gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added. This is the Freetype
patch (committed as e0469372) that fixes rounding issues for smaller fonts. It is bound to be included
in the 2.4.12 release of Freetype (not released yet) but is provided here as its effect on baselines is
considered positive and will reduce the amout of future rebaselining.

Modified Paths

Added Paths

Diff

Modified: trunk/Tools/ChangeLog (148793 => 148794)


--- trunk/Tools/ChangeLog	2013-04-20 19:21:51 UTC (rev 148793)
+++ trunk/Tools/ChangeLog	2013-04-20 19:22:59 UTC (rev 148794)
@@ -1,3 +1,16 @@
+2013-04-20  Zan Dobersek  <[email protected]>
+
+        [GTK] Fix baseline positioning issue by updating Freetype
+        https://bugs.webkit.org/show_bug.cgi?id=106775
+
+        Reviewed by Martin Robinson.
+
+        * gtk/jhbuild.modules: Bump the Freetype Jhbuild dependency to 2.4.11.
+        * gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added. This is the Freetype
+        patch (committed as e0469372) that fixes rounding issues for smaller fonts. It is bound to be included
+        in the 2.4.12 release of Freetype (not released yet) but is provided here as its effect on baselines is
+        considered positive and will reduce the amout of future rebaselining.
+
 2013-04-20  Manuel Rego Casasnovas  <[email protected]>
 
         [GTK] Fix unit test webkit2/WebKitFindController/hide

Modified: trunk/Tools/gtk/jhbuild.modules (148793 => 148794)


--- trunk/Tools/gtk/jhbuild.modules	2013-04-20 19:21:51 UTC (rev 148793)
+++ trunk/Tools/gtk/jhbuild.modules	2013-04-20 19:22:59 UTC (rev 148794)
@@ -51,6 +51,8 @@
       href=""
   <repository type="git" name="gstreamer"
       href=""
+  <repository type="tarball" name="savannah.gnu.org"
+      href=""
 
   <autotools id="make" autogen-sh="configure">
     <branch repo="ftp.gnu.org"
@@ -88,11 +90,14 @@
     <branch repo="github.com" module="mrobinson/webkitgtk-test-fonts.git" checkoutdir="webkitgtk-test-fonts" tag="0.0.4"/>
   </autotools>
 
-  <tarball id="freetype6">
-    <source href="" version="2.4.2"
-            hash="sha256:9a987aef8c50d9bcfdfdc9f012f8bd0de6095cc1a5524e62c1a037deb8dacbfe"
-            md5sum="647ee8ed266f9a4117c8d0a4855b3d3e"/>
-  </tarball>
+  <autotools id="freetype6" autogen-sh="configure">
+    <branch module="freetype/freetype-2.4.11.tar.bz2" version="2.4.11"
+            repo="savannah.gnu.org"
+            hash="sha256:ef9d0bcb64647d9e5125dc7534d7ca371c98310fec87677c410f397f71ffbe3f"
+            md5sum="b93435488942486c8d0ca22e8f768034">
+      <patch file="freetype6-2.4.11-truetype-font-height-fix.patch" strip="1"/>
+    </branch>
+  </autotools>
 
   <autotools id="harfbuzz" autogen-sh="configure">
     <branch module="software/harfbuzz/release/harfbuzz-0.9.14.tar.bz2" version="0.9.14"

Added: trunk/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch (0 => 148794)


--- trunk/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch	                        (rev 0)
+++ trunk/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch	2013-04-20 19:22:59 UTC (rev 148794)
@@ -0,0 +1,39 @@
+From e0469372be3870a5ad60b2c4586e9c281357bd28 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <[email protected]>
+Date: Tue, 22 Jan 2013 10:07:07 +0000
+Subject: [truetype] Fix font height.
+
+* src/truetype/ttobjs.c (tt_size_reset): The Windows rendering
+engine uses rounded values of the ascender and descender to compute
+the TrueType font height.
+---
+diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
+index c61b218..590b66c 100644
+--- a/src/truetype/ttobjs.c
++++ b/src/truetype/ttobjs.c
+@@ -4,7 +4,7 @@
+ /*                                                                         */
+ /*    Objects manager (body).                                              */
+ /*                                                                         */
+-/*  Copyright 1996-2012                                                    */
++/*  Copyright 1996-2013                                                    */
+ /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+ /*                                                                         */
+ /*  This file is part of the FreeType project, and may only be used,       */
+@@ -1177,11 +1177,12 @@
+         FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
+       metrics->descender =
+         FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
+-      metrics->height =
+-        FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
+       metrics->max_advance =
+         FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
+                                  metrics->x_scale ) );
++
++      /* the height is derived from rounded values */
++      metrics->height = metrics->ascender - metrics->descender;
+     }
+ 
+     /* compute new transformation */
+--
+cgit v0.9.0.2
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to