diff --git a/.gitignore b/.gitignore index f2a035b..42f0d14 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,6 @@ ft2demos-2.4.2.tar.bz2 /freetype-2.8.tar.bz2 /freetype-doc-2.8.tar.bz2 /ft2demos-2.8.tar.bz2 +/freetype-2.9.tar.bz2 +/freetype-doc-2.9.tar.bz2 +/ft2demos-2.9.tar.bz2 diff --git a/0077-truetype-Fix-loading-of-named-instances.patch b/0077-truetype-Fix-loading-of-named-instances.patch deleted file mode 100644 index 26fd0bc..0000000 --- a/0077-truetype-Fix-loading-of-named-instances.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 55bbb98f5c5a89230127d6b998a6e23e634b5d0e Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Tue, 1 Aug 2017 09:17:02 +0200 -Subject: [PATCH 077/132] [truetype] Fix loading of named instances. - -* src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position -while loading the `avar' table. ---- - ChangeLog | 7 +++++++ - include/freetype/ftmm.h | 2 +- - src/truetype/ttgxvar.c | 11 ++++++++++- - 3 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h -index c41b80ea6..1f48a4945 100644 ---- a/include/freetype/ftmm.h -+++ b/include/freetype/ftmm.h -@@ -178,7 +178,7 @@ FT_BEGIN_HEADER - /* strid :: The entry in `name' table identifying this instance. */ - /* */ - /* psid :: The entry in `name' table identifying a PostScript name */ -- /* for this instance. */ -+ /* for this instance. Value 0 indicates a missing entry. */ - /* */ - typedef struct FT_Var_Named_Style_ - { -diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c -index 68458362e..df42b3bfd 100644 ---- a/src/truetype/ttgxvar.c -+++ b/src/truetype/ttgxvar.c -@@ -2139,8 +2139,16 @@ - goto Exit; - - if ( fvar_head.instanceCount && !face->blend->avar_loaded ) -+ { -+ FT_ULong offset = FT_STREAM_POS(); -+ -+ - ft_var_load_avar( face ); - -+ if ( FT_STREAM_SEEK( offset ) ) -+ goto Exit; -+ } -+ - ns = mmvar->namedstyle; - nsc = face->blend->normalized_stylecoords; - for ( i = 0; i < fvar_head.instanceCount; i++, ns++ ) -@@ -2157,6 +2165,7 @@ - for ( j = 0; j < fvar_head.axisCount; j++, c++ ) - *c = FT_GET_LONG(); - -+ /* valid psid values are 6 and [256;32767] */ - if ( usePsName ) - ns->psid = FT_GET_USHORT(); - -@@ -2174,7 +2183,7 @@ - SFNT_Service sfnt = (SFNT_Service)face->sfnt; - - FT_Int found, dummy1, dummy2; -- FT_UInt strid = 0xFFFFFFFFUL; -+ FT_UInt strid = ~0U; - - - /* the default instance is missing in array the */ --- -2.13.5 - diff --git a/0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch b/0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch deleted file mode 100644 index e492e58..0000000 --- a/0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7e50824288fac5a36c2938fdb3e1c949ea53f982 Mon Sep 17 00:00:00 2001 -From: Werner Lemberg -Date: Tue, 1 Aug 2017 12:44:35 +0200 -Subject: [PATCH 079/132] * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko. - ---- - ChangeLog | 4 ++++ - include/freetype/ftmm.h | 3 ++- - src/truetype/ttgxvar.c | 4 +++- - 3 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h -index 1f48a4945..b1bc1ed82 100644 ---- a/include/freetype/ftmm.h -+++ b/include/freetype/ftmm.h -@@ -178,7 +178,8 @@ FT_BEGIN_HEADER - /* strid :: The entry in `name' table identifying this instance. */ - /* */ - /* psid :: The entry in `name' table identifying a PostScript name */ -- /* for this instance. Value 0 indicates a missing entry. */ -+ /* for this instance. Value 0xFFFF indicates a missing */ -+ /* entry. */ - /* */ - typedef struct FT_Var_Named_Style_ - { -diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c -index df42b3bfd..5a87df139 100644 ---- a/src/truetype/ttgxvar.c -+++ b/src/truetype/ttgxvar.c -@@ -2165,9 +2165,11 @@ - for ( j = 0; j < fvar_head.axisCount; j++, c++ ) - *c = FT_GET_LONG(); - -- /* valid psid values are 6 and [256;32767] */ -+ /* valid psid values are 6, [256;32767], and 0xFFFF */ - if ( usePsName ) - ns->psid = FT_GET_USHORT(); -+ else -+ ns->psid = 0xFFFF; - - ft_var_to_normalized( face, - fvar_head.axisCount, --- -2.13.5 - diff --git a/freetype-2.3.0-enable-spr.patch b/freetype-2.3.0-enable-spr.patch index 8432e28..d551000 100644 --- a/freetype-2.3.0-enable-spr.patch +++ b/freetype-2.3.0-enable-spr.patch @@ -1,8 +1,8 @@ --- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500 +++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500 @@ -92,7 +92,7 @@ - /* This is done to allow FreeType clients to run unmodified, forcing */ - /* them to display normal gray-level anti-aliased glyphs. */ + /* rendering technology that produces excellent output without LCD */ + /* filtering. */ /* */ -/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ +#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING diff --git a/freetype-2.8-loop-counter.patch b/freetype-2.8-loop-counter.patch deleted file mode 100644 index 61e9052..0000000 --- a/freetype-2.8-loop-counter.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8d435c463d22f6de35015b244d6f9bb433beb7e6 Mon Sep 17 00:00:00 2001 -From: Werner Lemberg -Date: Thu, 1 Jun 2017 07:09:44 +0200 -Subject: [PATCH] * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter - again. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Marek Kašík . - -The problematic font that exceeds the old limit is Padauk-Bold, -version 3.002, containing bytecode generated by a buggy version of -ttfautohint. ---- - ChangeLog | 10 ++++++++++ - src/truetype/ttinterp.c | 3 +-- - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c -index 0c48c256..775d1104 100644 ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -7649,8 +7649,7 @@ - FT_MAX( 50, - exc->cvtSize / 10 ); - else -- exc->loopcall_counter_max = FT_MAX( 100, -- 10 * exc->cvtSize ); -+ exc->loopcall_counter_max = 300 + 8 * exc->cvtSize; - - /* as a protection against an unreasonable number of CVT entries */ - /* we assume at most 100 control values per glyph for the counter */ --- -2.13.0 - diff --git a/freetype-2.8-multilib.patch b/freetype-2.8-multilib.patch index 4f40a80..706f583 100644 --- a/freetype-2.8-multilib.patch +++ b/freetype-2.8-multilib.patch @@ -1,11 +1,11 @@ ---- freetype-2.8/builds/unix/freetype-config.in -+++ freetype-2.8/builds/unix/freetype-config.in +--- freetype-2.9/builds/unix/freetype-config.in ++++ freetype-2.9/builds/unix/freetype-config.in @@ -13,45 +13,25 @@ LC_ALL=C export LC_ALL -# if `pkg-config' is available, use values from `freetype2.pc' --pkg-config --version >/dev/null 2>&1 +-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1 -if test $? -eq 0 ; then - # note that option `--variable' is not affected by the - # PKG_CONFIG_SYSROOT_DIR environment variable @@ -14,17 +14,17 @@ - export PKG_CONFIG_SYSROOT_DIR - fi - -- prefix=`pkg-config --variable prefix freetype2` -- exec_prefix=`pkg-config --variable exec_prefix freetype2` +- prefix=`%PKG_CONFIG% --variable prefix freetype2` +- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` - -- includedir=`pkg-config --variable includedir freetype2` -- libdir=`pkg-config --variable libdir freetype2` +- includedir=`%PKG_CONFIG% --variable includedir freetype2` +- libdir=`%PKG_CONFIG% --variable libdir freetype2` - -- version=`pkg-config --modversion freetype2` +- version=`%PKG_CONFIG% --modversion freetype2` - -- cflags=`pkg-config --cflags freetype2` -- dynamic_libs=`pkg-config --libs freetype2` -- static_libs=`pkg-config --static --libs freetype2` +- cflags=`%PKG_CONFIG% --cflags freetype2` +- dynamic_libs=`%PKG_CONFIG% --libs freetype2` +- static_libs=`%PKG_CONFIG% --static --libs freetype2` -else - prefix="%prefix%" - exec_prefix="%exec_prefix%" @@ -48,17 +48,17 @@ + export PKG_CONFIG_SYSROOT_DIR fi -+prefix=`pkg-config --variable prefix freetype2` -+exec_prefix=`pkg-config --variable exec_prefix freetype2` ++prefix=`%PKG_CONFIG% --variable prefix freetype2` ++exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` + -+includedir=`pkg-config --variable includedir freetype2` -+libdir=`pkg-config --variable libdir freetype2` ++includedir=`%PKG_CONFIG% --variable includedir freetype2` ++libdir=`%PKG_CONFIG% --variable libdir freetype2` + -+version=`pkg-config --modversion freetype2` ++version=`%PKG_CONFIG% --modversion freetype2` + -+cflags=`pkg-config --cflags freetype2` -+dynamic_libs=`pkg-config --libs freetype2` -+static_libs=`pkg-config --static --libs freetype2` ++cflags=`%PKG_CONFIG% --cflags freetype2` ++dynamic_libs=`%PKG_CONFIG% --libs freetype2` ++static_libs=`%PKG_CONFIG% --static --libs freetype2` + orig_prefix=$prefix orig_exec_prefix=$exec_prefix diff --git a/freetype-2.8-pcf-encoding.patch b/freetype-2.8-pcf-encoding.patch deleted file mode 100644 index fd1c706..0000000 --- a/freetype-2.8-pcf-encoding.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 082f2faf5007812bac6a1f783c7dcc6f49d761fe Mon Sep 17 00:00:00 2001 -From: Werner Lemberg -Date: Wed, 24 May 2017 07:40:46 +0200 -Subject: [PATCH] [bdf, pcf] Support ISO646.1991-IRV character encoding (aka - ASCII). -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Marek Kašík , cf. - - https://bugzilla.redhat.com/show_bug.cgi?id=1451795 - -* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c -(PCF_Face_Init): Implement it. ---- - ChangeLog | 11 +++++++++++ - src/bdf/bdfdrivr.c | 6 +++++- - src/pcf/pcfdrivr.c | 6 +++++- - 3 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c -index a2242be0..c0a5a5c5 100644 ---- a/src/bdf/bdfdrivr.c -+++ b/src/bdf/bdfdrivr.c -@@ -545,7 +545,11 @@ THE SOFTWARE. - if ( !ft_strcmp( s, "10646" ) || - ( !ft_strcmp( s, "8859" ) && - !ft_strcmp( face->charset_encoding, "1" ) ) ) -- unicode_charmap = 1; -+ unicode_charmap = 1; -+ /* another name for ASCII */ -+ else if ( !ft_strcmp( s, "646.1991" ) && -+ !ft_strcmp( face->charset_encoding, "IRV" ) ) -+ unicode_charmap = 1; - } - - { -diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c -index 9f4d36d1..50530941 100644 ---- a/src/pcf/pcfdrivr.c -+++ b/src/pcf/pcfdrivr.c -@@ -387,7 +387,11 @@ THE SOFTWARE. - if ( !ft_strcmp( s, "10646" ) || - ( !ft_strcmp( s, "8859" ) && - !ft_strcmp( face->charset_encoding, "1" ) ) ) -- unicode_charmap = 1; -+ unicode_charmap = 1; -+ /* another name for ASCII */ -+ else if ( !ft_strcmp( s, "646.1991" ) && -+ !ft_strcmp( face->charset_encoding, "IRV" ) ) -+ unicode_charmap = 1; - } - } - --- -2.13.0 - diff --git a/freetype-2.9-ftsmooth.patch b/freetype-2.9-ftsmooth.patch new file mode 100644 index 0000000..2735bd5 --- /dev/null +++ b/freetype-2.9-ftsmooth.patch @@ -0,0 +1,101 @@ +--- a/src/smooth/ftsmooth.c ++++ b/src/smooth/ftsmooth.c +@@ -232,39 +232,13 @@ + FT_UInt i, j; + + unsigned int height = bitmap->rows; +- unsigned int width = bitmap->width; ++ unsigned int width = bitmap->width / 3; + int pitch = bitmap->pitch; + +- +- /* Render 3 separate monochrome bitmaps, shifting the outline */ +- /* by 1/3 pixel. */ +- width /= 3; +- +- bitmap->buffer += width; +- +- error = render->raster_render( render->raster, ¶ms ); +- if ( error ) +- goto Exit; +- +- FT_Outline_Translate( outline, -21, 0 ); +- x_shift -= 21; +- bitmap->buffer += width; +- + error = render->raster_render( render->raster, ¶ms ); + if ( error ) + goto Exit; + +- FT_Outline_Translate( outline, 42, 0 ); +- x_shift += 42; +- bitmap->buffer -= 2 * width; +- +- error = render->raster_render( render->raster, ¶ms ); +- if ( error ) +- goto Exit; +- +- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */ +- /* XXX: It is more efficient to render every third byte above. */ +- + if ( FT_ALLOC( temp, (FT_ULong)pitch ) ) + goto Exit; + +@@ -272,11 +246,7 @@ + { + line = bitmap->buffer + i * (FT_ULong)pitch; + for ( j = 0; j < width; j++ ) +- { +- temp[3 * j ] = line[j]; +- temp[3 * j + 1] = line[j + width]; +- temp[3 * j + 2] = line[j + width + width]; +- } ++ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j]; + FT_MEM_COPY( line, temp, pitch ); + } + +@@ -284,35 +254,23 @@ + } + else if ( vmul ) /* lcd_v */ + { +- int pitch = bitmap->pitch; +- ++ FT_Byte* line; ++ FT_UInt i; ++ int original_pitch = bitmap->pitch; + +- /* Render 3 separate monochrome bitmaps, shifting the outline */ +- /* by 1/3 pixel. Triple the pitch to render on each third row. */ + bitmap->pitch *= 3; + bitmap->rows /= 3; + +- bitmap->buffer += pitch; +- +- error = render->raster_render( render->raster, ¶ms ); +- if ( error ) +- goto Exit; +- +- FT_Outline_Translate( outline, 0, 21 ); +- y_shift += 21; +- bitmap->buffer += pitch; +- + error = render->raster_render( render->raster, ¶ms ); + if ( error ) + goto Exit; + +- FT_Outline_Translate( outline, 0, -42 ); +- y_shift -= 42; +- bitmap->buffer -= 2 * pitch; +- +- error = render->raster_render( render->raster, ¶ms ); +- if ( error ) +- goto Exit; ++ for ( i = 0; i < bitmap->rows; i++ ) ++ { ++ line = bitmap->buffer + i * bitmap->pitch; ++ FT_MEM_COPY( line + original_pitch, line, bitmap->width ); ++ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width ); ++ } + + bitmap->pitch /= 3; + bitmap->rows *= 3; diff --git a/freetype.spec b/freetype.spec index 2584cad..f16bbf2 100644 --- a/freetype.spec +++ b/freetype.spec @@ -6,8 +6,8 @@ Summary: A free and portable font rendering engine Name: freetype -Version: 2.8 -Release: 10%{?dist} +Version: 2.9 +Release: 1%{?dist} License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement Group: System Environment/Libraries URL: http://www.freetype.org @@ -25,16 +25,11 @@ Patch2: freetype-2.5.2-more-demos.patch Patch3: freetype-2.6.5-libtool.patch -Patch4: freetype-2.8-pcf-encoding.patch +Patch4: freetype-2.8-multilib.patch -Patch5: freetype-2.8-loop-counter.patch +Patch5: freetype-2.8-getvariation.patch -Patch6: 0077-truetype-Fix-loading-of-named-instances.patch -Patch7: 0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch - -Patch8: freetype-2.8-multilib.patch - -Patch9: freetype-2.8-getvariation.patch +Patch6: freetype-2.9-ftsmooth.patch BuildRequires: libX11-devel BuildRequires: libpng-devel @@ -95,12 +90,9 @@ pushd ft2demos-%{version} popd %patch3 -p1 -b .libtool -%patch4 -p1 -b .pcf-encoding -%patch5 -p1 -b .loop-counter -%patch6 -p1 -b .named-instances -%patch7 -p1 -b .named-instances2 -%patch8 -p1 -b .multilib -%patch9 -p1 -b .getvariation +%patch4 -p1 -b .multilib +%patch5 -p1 -b .getvariation +%patch6 -p1 -b .ftsmooth %build @@ -212,6 +204,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Tue Mar 20 2018 Marek Kasik - 2.9-1 +- Update to 2.9 +- Add/modify/remove patches as needed +- Resolves: #1492372 + * Fri Feb 16 2018 Marek Kasik - 2.8-10 - Avoid NULL reference - Resolves: #1544776 diff --git a/sources b/sources index 772e8f1..b56f9b1 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (freetype-2.8.tar.bz2) = 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 -SHA512 (freetype-doc-2.8.tar.bz2) = 3a970a7dd6f0ba580c9f8084b271c11e6e87111ab9a5b6a3148eb1087e45ee18e998aa7e36a4311067a3b674cb784b1e827cf8c3a853e380078219be3eccce06 -SHA512 (ft2demos-2.8.tar.bz2) = dffdf6a493e8145c6513be34b57734a9a99c61f758a0e1ea691ef4284cee4c274ad7c3a8120a8ec425d86e33a70cd879d9db258e9c67b6a4db79c3243d4c9fb3 +SHA512 (freetype-2.9.tar.bz2) = 28465f3453baf9a187529432118389de8f1b85273c9fb787d2c8f0feee8ab64b387ddd936b4e67ec58dcf71e33884e7e25f01169b737824221ab143839a9161a +SHA512 (freetype-doc-2.9.tar.bz2) = 0ffd38541f8fd0ae6efb97025bb585209580b964d632e15c66944bc2549e2b0e6c375a141df5061621e8c32eeaed017834530169addc4daa2e83399f88efde2f +SHA512 (ft2demos-2.9.tar.bz2) = 3dfaf97619d585d6e4db20002c69f9c46cb8991c4faf86d9d92884a80001235ef01010148156cb4879d7869e6121fc27ef03c13288af011df26fe85c3fb7e6a1