commit c3df79bf0030a8afcded1ef0a94880b3c5861c45
Author: Kevin Kofler <kevin.kofler(a)chello.at>
Date: Wed Apr 5 02:20:29 2017 +0200
Add freetype-2.6.5-linear-scaling.patch from Fedora freetype (rh#1437999)
* Wed Apr 05 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.6.5-3
- Add freetype-2.6.5-linear-scaling.patch from Fedora freetype (rh#1437999)
freetype-2.6.5-linear-scaling.patch | 71 +++++++++++++++++++++++++++++++++++++
freetype-freeworld.spec | 11 +++++-
2 files changed, 81 insertions(+), 1 deletion(-)
---
diff --git a/freetype-2.6.5-linear-scaling.patch b/freetype-2.6.5-linear-scaling.patch
new file mode 100644
index 0000000..57a30a1
--- /dev/null
+++ b/freetype-2.6.5-linear-scaling.patch
@@ -0,0 +1,71 @@
+From bcc74f4dafee25ea89f1d3144646cba7e30f9908 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl(a)gnu.org>
+Date: Thu, 30 Mar 2017 13:14:43 +0200
+Subject: [truetype] Allow linear scaling for unhinted rendering (#50470).
+
+* src/truetype/ttdriver.c (tt_size_request): Revert change from
+2011-07-16; the intended metrics fix seems now to be implemented in
+a different way, making the patch unnecessary. Note that this
+change was usually patched out by all major GNU/Linux distributions
+due to heavy side effects.
+
+* src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
+Refer to the metrics of the `TT_Size' object.
+
+diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
+index 4ec78e2f..9bf0f84f 100644
+--- a/src/truetype/ttdriver.c
++++ b/src/truetype/ttdriver.c
+@@ -316,7 +316,6 @@
+ if ( FT_IS_SCALABLE( size->face ) )
+ {
+ error = tt_size_reset( ttsize );
+- ttsize->root.metrics = ttsize->metrics;
+ }
+
+ return error;
+diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
+index 35b62d0e..b225190a 100644
+--- a/src/truetype/ttgload.c
++++ b/src/truetype/ttgload.c
+@@ -2002,7 +2002,7 @@
+
+ y_scale = 0x10000L;
+ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
+- y_scale = size->root.metrics.y_scale;
++ y_scale = size->metrics.y_scale;
+
+ if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
+ FT_Outline_Get_CBox( &glyph->outline, &bbox );
+@@ -2034,7 +2034,7 @@
+
+
+ widthp = tt_face_get_device_metrics( face,
+- size->root.metrics.x_ppem,
++ size->metrics.x_ppem,
+ glyph_index );
+
+ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+@@ -2623,11 +2623,11 @@
+ if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
+ glyph->metrics.horiAdvance =
+ FT_MulFix( glyph->linearHoriAdvance,
+- size->root.metrics.x_scale );
++ size->metrics.x_scale );
+ if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
+ glyph->metrics.vertAdvance =
+ FT_MulFix( glyph->linearVertAdvance,
+- size->root.metrics.y_scale );
++ size->metrics.y_scale );
+ }
+
+ return FT_Err_Ok;
+@@ -2717,7 +2717,7 @@
+ /* TrueType glyphs at all sizes using the bytecode interpreter. */
+ /* */
+ if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
+- size->root.metrics.y_ppem < 24 )
++ size->metrics.y_ppem < 24 )
+ glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
+
+ return error;
diff --git a/freetype-freeworld.spec b/freetype-freeworld.spec
index 1bed447..298ac56 100644
--- a/freetype-freeworld.spec
+++ b/freetype-freeworld.spec
@@ -1,7 +1,7 @@
Summary: A free and portable font rendering engine
Name: freetype-freeworld
Version: 2.6.5
-Release: 2%{?dist}
+Release: 3%{?dist}
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
URL:
http://www.freetype.org
Source:
http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.ta...
@@ -11,6 +11,10 @@ Patch21: freetype-2.3.0-enable-spr.patch
# Enable otvalid and gxvalid modules
Patch46: freetype-2.2.1-enable-valid.patch
+# Allow linear scaling for unhinted rendering
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1437999
+Patch50: freetype-2.6.5-linear-scaling.patch
+
## Security fixes:
#
https://bugzilla.redhat.com/show_bug.cgi?id=1429965
Patch94: freetype-2.6.5-heap-buffer-overflow.patch
@@ -43,6 +47,8 @@ It transparently overrides the system library using ld.so.conf.d.
%patch46 -p1 -b .enable-valid
+%patch50 -p1 -b .linear-scaling
+
%patch94 -p1 -b .heap-buffer-overflow
@@ -88,6 +94,9 @@ echo "%{_libdir}/%{name}" \
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Wed Apr 05 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.6.5-3
+- Add freetype-2.6.5-linear-scaling.patch from Fedora freetype (rh#1437999)
+
* Sat Mar 11 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.6.5-2
- Add CVE-2016-10244 (heap buffer overflow, rh#1429965) fix from Fedora freetype