From 246acfa40bf6e3be4f93751b73af1262fd2dd204 Mon Sep 17 00:00:00 2001 From: Jared Hancock Date: Mon, 9 Jan 2017 15:25:13 -0500 Subject: [PATCH] fc25: Add initial support for Fedora 25 Bump to versions given in the Fedora 25 repo: fontconfig 2.12.1 and freetype 2.7.1 --- Makefile | 2 +- .../04-Makefile.conf.d.patch | 3 +- .../fontconfig-infinality-ultimate.spec | 19 +- ...tch => 03-infinality-2.7-2016.09.09.patch} | 689 ++++++------------ .../freetype-2.2.1-enable-valid.patch | 106 ++- .../freetype-2.3.0-enable-spr.patch | 100 +++ .../freetype-2.6.5-libtool.patch | 100 +++ .../freetype-infinality-ultimate.spec | 21 +- 8 files changed, 536 insertions(+), 504 deletions(-) rename freetype-infinality-ultimate/{03-infinality-2.6.3-2016.03.26.patch => 03-infinality-2.7-2016.09.09.patch} (93%) create mode 100644 freetype-infinality-ultimate/freetype-2.3.0-enable-spr.patch create mode 100644 freetype-infinality-ultimate/freetype-2.6.5-libtool.patch diff --git a/Makefile b/Makefile index 34c874c..a93a6da 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BASE = fedora-24 +BASE = fedora-25 DIRS = $(wildcard */) define makerpm = diff --git a/fontconfig-infinality-ultimate/04-Makefile.conf.d.patch b/fontconfig-infinality-ultimate/04-Makefile.conf.d.patch index beb33a5..7ef20c1 100644 --- a/fontconfig-infinality-ultimate/04-Makefile.conf.d.patch +++ b/fontconfig-infinality-ultimate/04-Makefile.conf.d.patch @@ -9,7 +9,7 @@ DATA = $(config_DATA) $(template_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README -@@ -343,25 +343,8 @@ target_alias = @target_alias@ +@@ -343,26 +343,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -17,6 +17,7 @@ -DOC_SOURCES = README.in DOC_FILES = $(DOC_SOURCES:.in=) -CONF_LINKS = \ +- 10-hinting-$(PREFERRED_HINTING).conf \ - 10-scale-bitmap-fonts.conf \ - 20-unhint-small-vera.conf \ - 30-urw-aliases.conf \ diff --git a/fontconfig-infinality-ultimate/fontconfig-infinality-ultimate.spec b/fontconfig-infinality-ultimate/fontconfig-infinality-ultimate.spec index 122be95..55b0a3b 100644 --- a/fontconfig-infinality-ultimate/fontconfig-infinality-ultimate.spec +++ b/fontconfig-infinality-ultimate/fontconfig-infinality-ultimate.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig-infinality-ultimate -Version: 2.11.94 -Release: 5%{?dist} +Version: 2.12.1 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -17,13 +17,11 @@ Source2: presets.tar.bz2 # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: fontconfig-sleep-less.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1236034 -Patch1: fontconfig-lock-cache.patch -Patch3: 01-configure.patch -Patch4: 02-configure.ac.patch -Patch5: 03-Makefile.in.patch -Patch6: 04-Makefile.conf.d.patch -Patch7: 05-Makefile.am.in.patch +Patch2: 01-configure.patch +Patch3: 02-configure.ac.patch +Patch4: 03-Makefile.in.patch +Patch5: 04-Makefile.conf.d.patch +Patch6: 05-Makefile.am.in.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -77,12 +75,11 @@ which is useful for developing applications that uses fontconfig. cd .. %setup -q -a 1 -n fontconfig-%{version} %patch0 -p1 -b .sleep-less -%patch1 -p1 -b .lock-cache +%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 aclocal libtoolize -f diff --git a/freetype-infinality-ultimate/03-infinality-2.6.3-2016.03.26.patch b/freetype-infinality-ultimate/03-infinality-2.7-2016.09.09.patch similarity index 93% rename from freetype-infinality-ultimate/03-infinality-2.6.3-2016.03.26.patch rename to freetype-infinality-ultimate/03-infinality-2.7-2016.09.09.patch index 12bbc44..b55c523 100644 --- a/freetype-infinality-ultimate/03-infinality-2.6.3-2016.03.26.patch +++ b/freetype-infinality-ultimate/03-infinality-2.7-2016.09.09.patch @@ -1,8 +1,7 @@ -diff --git a/builds/freetype.mk b/builds/freetype.mk -index 1cc7e29..c73ae68 100644 ---- a/builds/freetype.mk -+++ b/builds/freetype.mk -@@ -161,6 +161,7 @@ FT_CFLAGS = $(CPPFLAGS) \ +diff -ruN freetype-2.7-orig/builds/freetype.mk freetype-2.7/builds/freetype.mk +--- freetype-2.7-orig/builds/freetype.mk 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/builds/freetype.mk 2016-09-09 16:01:22.458500695 +0200 +@@ -161,6 +161,7 @@ $(CFLAGS) \ $DFT2_BUILD_LIBRARY \ $DFT_CONFIG_MODULES_H="" \ @@ -10,10 +9,9 @@ index 1cc7e29..c73ae68 100644 $(FTOPTION_FLAG) -diff --git a/configure b/configure -index fd52581..bb81fb8 100755 ---- a/configure -+++ b/configure +diff -ruN freetype-2.7-orig/configure freetype-2.7/configure +--- freetype-2.7-orig/configure 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/configure 2016-09-09 16:01:22.461834056 +0200 @@ -13,6 +13,8 @@ # Call the `configure' script located in `builds/unix'. # @@ -23,12 +21,12 @@ index fd52581..bb81fb8 100755 rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk # respect GNUMAKE environment variable for backwards compatibility -diff --git a/devel/ftoption.h b/devel/ftoption.h ---- a/devel/ftoption.h 2016-03-28 12:09:54.392246487 +0200 -+++ b/devel/ftoption.h 2016-03-28 12:17:20.364039723 +0200 -@@ -604,6 +604,16 @@ FT_BEGIN_HEADER +diff -ruN freetype-2.7-orig/devel/ftoption.h freetype-2.7/devel/ftoption.h +--- freetype-2.7-orig/devel/ftoption.h 2016-09-02 08:19:35.000000000 +0200 ++++ freetype-2.7/devel/ftoption.h 2016-09-09 16:01:22.461834056 +0200 +@@ -626,6 +626,16 @@ /* */ - #define TT_CONFIG_OPTION_SUBPIXEL_HINTING + #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + /*************************************************************************/ + /* */ @@ -43,11 +41,10 @@ diff --git a/devel/ftoption.h b/devel/ftoption.h /*************************************************************************/ /* */ -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index b481f8f..b05932a 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -92,7 +92,7 @@ FT_BEGIN_HEADER +diff -ruN freetype-2.7-orig/include/freetype/config/ftoption.h freetype-2.7/include/freetype/config/ftoption.h +--- freetype-2.7-orig/include/freetype/config/ftoption.h 2016-09-02 07:47:15.000000000 +0200 ++++ freetype-2.7/include/freetype/config/ftoption.h 2016-09-09 18:35:36.626205358 +0200 +@@ -122,7 +122,7 @@ /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ /* */ @@ -56,31 +53,20 @@ index b481f8f..b05932a 100644 /*************************************************************************/ -@@ -602,7 +602,19 @@ FT_BEGIN_HEADER - /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ - /* defined. */ +@@ -675,8 +675,8 @@ + /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ /* */ --/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ -+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* Define FT_CONFIG_OPTION_INFINALITY_PATCHSET if you want to enable */ -+ /* all additional infinality patches, which are configured via env */ -+ /* variables. */ -+ /* */ -+ /* This option requires TT_CONFIG_OPTION_SUBPIXEL_HINTING to */ -+ /* defined. */ -+ /* */ -+#define FT_CONFIG_OPTION_INFINALITY_PATCHSET + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ +-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 +-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) /*************************************************************************/ -diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c -index 53851e7..c20e7d3 100644 ---- a/src/autofit/aflatin.c -+++ b/src/autofit/aflatin.c +diff -ruN freetype-2.7-orig/src/autofit/aflatin.c freetype-2.7/src/autofit/aflatin.c +--- freetype-2.7-orig/src/autofit/aflatin.c 2016-08-26 11:45:36.000000000 +0200 ++++ freetype-2.7/src/autofit/aflatin.c 2016-09-09 16:01:22.465167416 +0200 @@ -24,7 +24,10 @@ #include "afpic.h" #include "aflatin.h" @@ -166,7 +152,7 @@ index 53851e7..c20e7d3 100644 #endif -@@ -2337,7 +2363,10 @@ +@@ -2407,7 +2433,10 @@ dist = edge->fpos - blue->shoot.org; if ( dist < 0 ) dist = -dist; @@ -178,7 +164,7 @@ index 53851e7..c20e7d3 100644 dist = FT_MulFix( dist, scale ); if ( dist < best_dist ) { -@@ -2513,8 +2542,17 @@ +@@ -2583,8 +2612,17 @@ FT_Pos dist = width; FT_Int sign = 0; FT_Int vertical = ( dim == AF_DIMENSION_VERT ); @@ -197,7 +183,7 @@ index 53851e7..c20e7d3 100644 if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) || axis->extra_light ) return width; -@@ -2524,9 +2562,73 @@ +@@ -2594,9 +2632,76 @@ dist = -width; sign = 1; } @@ -215,12 +201,15 @@ index 53851e7..c20e7d3 100644 + abs( axis->widths[0].cur - infinality_dist ) < 32 && + axis->widths[0].cur > 52 ) + { -+ if ( strstr( metrics->root.scaler.face->style_name, "Regular" ) || -+ strstr( metrics->root.scaler.face->style_name, "Book" ) || -+ strstr( metrics->root.scaler.face->style_name, "Medium" ) || -+ strcmp( metrics->root.scaler.face->style_name, "Italic" ) == 0 || -+ strcmp( metrics->root.scaler.face->style_name, "Oblique" ) == 0 ) -+ { ++ const char *style_name=metrics->root.scaler.face->style_name; ++ if ( style_name!=NULL && ++ ( strstr( style_name, "Regular" ) || ++ strstr( style_name, "Book" ) || ++ strstr( style_name, "Medium" ) || ++ strcmp( style_name, "Italic" ) == 0 || ++ strcmp( style_name, "Oblique" ) == 0 ) ++ ) ++ { + /* regular weight */ + if ( axis->widths[0].cur < 64 ) + infinality_dist = 64; @@ -272,7 +261,7 @@ index 53851e7..c20e7d3 100644 { /* smooth hinting process: very lightly quantize the stem width */ -@@ -2618,6 +2720,9 @@ +@@ -2688,6 +2793,9 @@ } } else @@ -282,7 +271,7 @@ index 53851e7..c20e7d3 100644 { /* strong hinting process: snap the stem width to integer pixels */ -@@ -2625,7 +2730,10 @@ +@@ -2695,7 +2803,10 @@ dist = af_latin_snap_width( axis->widths, axis->width_count, dist ); @@ -294,7 +283,7 @@ index 53851e7..c20e7d3 100644 if ( vertical ) { /* in the case of vertical hinting, always round */ -@@ -2688,6 +2796,32 @@ +@@ -2758,6 +2869,32 @@ } Done_Width: @@ -327,7 +316,7 @@ index 53851e7..c20e7d3 100644 if ( sign ) dist = -dist; -@@ -2706,6 +2840,8 @@ +@@ -2776,6 +2913,8 @@ FT_Pos dist, base_delta; FT_Pos fitted_width; @@ -336,7 +325,7 @@ index 53851e7..c20e7d3 100644 dist = stem_edge->opos - base_edge->opos; base_delta = base_edge->pos - base_edge->opos; -@@ -3314,8 +3450,11 @@ +@@ -3384,8 +3523,11 @@ int dim; AF_LatinAxis axis; @@ -350,7 +339,7 @@ index 53851e7..c20e7d3 100644 error = af_glyph_hints_reload( hints, outline ); if ( error ) goto Exit; -@@ -3385,7 +3524,11 @@ +@@ -3455,7 +3597,11 @@ } af_glyph_hints_save( hints, outline ); @@ -363,11 +352,10 @@ index 53851e7..c20e7d3 100644 Exit: return error; } -diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h -index dd75ef3..257265e 100644 ---- a/src/autofit/aflatin.h -+++ b/src/autofit/aflatin.h -@@ -64,6 +64,9 @@ FT_BEGIN_HEADER +diff -ruN freetype-2.7-orig/src/autofit/aflatin.h freetype-2.7/src/autofit/aflatin.h +--- freetype-2.7-orig/src/autofit/aflatin.h 2016-03-15 07:53:53.000000000 +0100 ++++ freetype-2.7/src/autofit/aflatin.h 2016-09-09 16:01:22.465167416 +0200 +@@ -64,6 +64,9 @@ #define AF_LATIN_MAX_WIDTHS 16 @@ -377,22 +365,33 @@ index dd75ef3..257265e 100644 #define AF_LATIN_BLUE_ACTIVE ( 1U << 0 ) /* zone height is <= 3/4px */ #define AF_LATIN_BLUE_TOP ( 1U << 1 ) /* we have a top blue zone */ -diff --git a/src/base/Jamfile b/src/base/Jamfile -index e39fb09..a33e9a1 100644 ---- a/src/base/Jamfile -+++ b/src/base/Jamfile -@@ -56,6 +56,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ; - ftglyph - ftgxval - ftinit -+ ftinf - ftlcdfil - ftmm - ftotval -diff --git a/src/base/ftbase.c b/src/base/ftbase.c -index 253dfb7..59d2d17 100644 ---- a/src/base/ftbase.c -+++ b/src/base/ftbase.c +diff -ruN freetype-2.7-orig/src/autofit/afmodule.c freetype-2.7/src/autofit/afmodule.c +--- freetype-2.7-orig/src/autofit/afmodule.c 2016-08-26 11:45:36.000000000 +0200 ++++ freetype-2.7/src/autofit/afmodule.c 2016-09-09 16:01:22.465167416 +0200 +@@ -22,6 +22,10 @@ + #include "aferrors.h" + #include "afpic.h" + ++#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET ++#include "../base/ftinf.h" ++#endif ++ + #ifdef FT_DEBUG_AUTOFIT + + #ifndef FT_MAKE_OPTION_SINGLE_OBJECT +@@ -464,6 +468,9 @@ + module->warping = 0; + #endif + module->no_stem_darkening = TRUE; ++#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET ++ if(ftinf) module->no_stem_darkening = !ftinf->stem_darkening_autofit; ++#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ + + module->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1; + module->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1; +diff -ruN freetype-2.7-orig/src/base/ftbase.c freetype-2.7/src/base/ftbase.c +--- freetype-2.7-orig/src/base/ftbase.c 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/src/base/ftbase.c 2016-09-09 16:01:22.465167416 +0200 @@ -34,6 +34,9 @@ #include "ftstream.c" #include "fttrigon.c" @@ -403,12 +402,10 @@ index 253dfb7..59d2d17 100644 #ifdef FT_MACINTOSH #include "ftmac.c" -diff --git a/src/base/ftinf.c b/src/base/ftinf.c -new file mode 100644 -index 0000000..cef285d ---- /dev/null -+++ b/src/base/ftinf.c -@@ -0,0 +1,359 @@ +diff -ruN freetype-2.7-orig/src/base/ftinf.c freetype-2.7/src/base/ftinf.c +--- freetype-2.7-orig/src/base/ftinf.c 1970-01-01 01:00:00.000000000 +0100 ++++ freetype-2.7/src/base/ftinf.c 2016-09-09 16:01:22.465167416 +0200 +@@ -0,0 +1,363 @@ +#include +#include "ftinf.h" +#define true 1 @@ -646,6 +643,10 @@ index 0000000..cef285d + if( s ) sscanf( s, "%d", &_env.stem_snapping_sliding_scale ); + s=getenv( "INFINALITY_FT_STEM_ALIGNMENT_STRENGTH" ); + if( s ) sscanf( s, "%d", &_env.stem_alignment_strength ); ++ s=getenv( "INFINALITY_FT_STEM_DARKENING_AUTOFIT" ); ++ if( s ) _env.stem_darkening_autofit=bool_val( s ); ++ s=getenv( "INFINALITY_FT_STEM_DARKENING_CFF" ); ++ if( s ) _env.stem_darkening_cff=bool_val( s ); + s=getenv( "INFINALITY_FT_STEM_FITTING_STRENGTH" ); + if( s ) sscanf( s, "%d", &_env.stem_fitting_strength ); + s=getenv( "INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH" ); @@ -768,12 +769,10 @@ index 0000000..cef285d + /* point to the combined and checked settings */ + ftinf=&_env; +} -diff --git a/src/base/ftinf.h b/src/base/ftinf.h -new file mode 100644 -index 0000000..dc35f48 ---- /dev/null -+++ b/src/base/ftinf.h -@@ -0,0 +1,64 @@ +diff -ruN freetype-2.7-orig/src/base/ftinf.h freetype-2.7/src/base/ftinf.h +--- freetype-2.7-orig/src/base/ftinf.h 1970-01-01 01:00:00.000000000 +0100 ++++ freetype-2.7/src/base/ftinf.h 2016-09-09 16:01:22.465167416 +0200 +@@ -0,0 +1,66 @@ +#ifndef _FTINF_H_ +#define _FTINF_H_ +/* @@ -818,6 +817,8 @@ index 0000000..dc35f48 + int global_embolden_y_value; + int grayscale_filter_strength; + int stem_alignment_strength; ++ int stem_darkening_autofit; ++ int stem_darkening_cff; + int stem_fitting_strength; + int stem_snapping_sliding_scale; + int use_known_settings_on_selected_fonts; @@ -838,14 +839,12 @@ index 0000000..dc35f48 +extern void ftinf_env(); + +#endif -diff --git a/src/base/ftinf_rh.c b/src/base/ftinf_rh.c -new file mode 100644 -index 0000000..4cd6f1a ---- /dev/null -+++ b/src/base/ftinf_rh.c -@@ -0,0 +1,628 @@ +diff -ruN freetype-2.7-orig/src/base/ftinf_rh.c freetype-2.7/src/base/ftinf_rh.c +--- freetype-2.7-orig/src/base/ftinf_rh.c 1970-01-01 01:00:00.000000000 +0100 ++++ freetype-2.7/src/base/ftinf_rh.c 2016-09-09 16:01:22.465167416 +0200 +@@ -0,0 +1,626 @@ +/* ANSI-C code produced by gperf version 3.1 */ -+/* Command-line: gperf ftinf_rh.gperf */ ++/* Command-line: gperf --output-file=ftinf_rh.c ftinf_rh.gperf */ +/* Computed positions: -k'1,$' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -1458,13 +1457,11 @@ index 0000000..4cd6f1a + char buf[max_wlen+1]; + int len=strlen( name ); + if( len <= max_wlen ){ -+ const sa_rules_t *p; + int i; + for( i=0; iformat == FT_GLYPH_FORMAT_OUTLINE ) { /* check that the loaded outline is correct */ -@@ -4727,6 +4787,11 @@ +@@ -4785,6 +4845,11 @@ /* That's ok now */ *alibrary = library; @@ -2715,10 +2700,9 @@ index ea40396..7156a0b 100644 return FT_Err_Ok; #ifdef FT_CONFIG_OPTION_PIC -diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c -index 201ceab..4c8746d 100644 ---- a/src/base/ftoutln.c -+++ b/src/base/ftoutln.c +diff -ruN freetype-2.7-orig/src/base/ftoutln.c freetype-2.7/src/base/ftoutln.c +--- freetype-2.7-orig/src/base/ftoutln.c 2016-08-26 11:12:02.000000000 +0200 ++++ freetype-2.7/src/base/ftoutln.c 2016-09-09 16:01:22.465167416 +0200 @@ -29,7 +29,9 @@ #include FT_INTERNAL_CALC_H #include FT_INTERNAL_DEBUG_H @@ -2745,10 +2729,9 @@ index 201ceab..4c8746d 100644 if ( !outline ) return FT_THROW( Invalid_Outline ); -diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c -index cd68533..aa68c88 100644 ---- a/src/base/ftsynth.c -+++ b/src/base/ftsynth.c +diff -ruN freetype-2.7-orig/src/base/ftsynth.c freetype-2.7/src/base/ftsynth.c +--- freetype-2.7-orig/src/base/ftsynth.c 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/src/base/ftsynth.c 2016-09-09 16:01:22.465167416 +0200 @@ -22,7 +22,9 @@ #include FT_INTERNAL_OBJECTS_H #include FT_OUTLINE_H @@ -2800,11 +2783,21 @@ index cd68533..aa68c88 100644 slot->metrics.horiAdvance += xstr; slot->metrics.vertAdvance += ystr; slot->metrics.horiBearingY += ystr; -diff --git a/src/base/rules.mk b/src/base/rules.mk -index 1852e08..f7ae0e6 100644 ---- a/src/base/rules.mk -+++ b/src/base/rules.mk -@@ -42,6 +42,7 @@ BASE_SRC := $(BASE_DIR)/basepic.c \ +diff -ruN freetype-2.7-orig/src/base/Jamfile freetype-2.7/src/base/Jamfile +--- freetype-2.7-orig/src/base/Jamfile 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/src/base/Jamfile 2016-09-09 16:01:22.465167416 +0200 +@@ -56,6 +56,7 @@ + ftglyph + ftgxval + ftinit ++ ftinf + ftlcdfil + ftmm + ftotval +diff -ruN freetype-2.7-orig/src/base/rules.mk freetype-2.7/src/base/rules.mk +--- freetype-2.7-orig/src/base/rules.mk 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/src/base/rules.mk 2016-09-09 16:01:22.465167416 +0200 +@@ -42,6 +42,7 @@ $(BASE_DIR)/ftdbgmem.c \ $(BASE_DIR)/ftgloadr.c \ $(BASE_DIR)/fthash.c \ @@ -2812,10 +2805,32 @@ index 1852e08..f7ae0e6 100644 $(BASE_DIR)/ftobjs.c \ $(BASE_DIR)/ftoutln.c \ $(BASE_DIR)/ftpic.c \ -diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c -index 3620550..b5b3056 100644 ---- a/src/smooth/ftsmooth.c -+++ b/src/smooth/ftsmooth.c +diff -ruN freetype-2.7-orig/src/cff/cffobjs.c freetype-2.7/src/cff/cffobjs.c +--- freetype-2.7-orig/src/cff/cffobjs.c 2016-08-26 11:45:36.000000000 +0200 ++++ freetype-2.7/src/cff/cffobjs.c 2016-09-09 16:01:22.465167416 +0200 +@@ -34,6 +34,9 @@ + + #include "cfferrs.h" + ++#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET ++#include "../base/ftinf.h" ++#endif + + /*************************************************************************/ + /* */ +@@ -1096,6 +1099,9 @@ + #endif + + driver->no_stem_darkening = TRUE; ++#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET ++ if(ftinf) driver->no_stem_darkening = !ftinf->stem_darkening_cff; ++#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ + + driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1; + driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1; +diff -ruN freetype-2.7-orig/src/smooth/ftsmooth.c freetype-2.7/src/smooth/ftsmooth.c +--- freetype-2.7-orig/src/smooth/ftsmooth.c 2016-02-03 19:13:58.000000000 +0100 ++++ freetype-2.7/src/smooth/ftsmooth.c 2016-09-09 16:01:22.468500777 +0200 @@ -26,6 +26,18 @@ #include "ftsmerrs.h" @@ -2835,72 +2850,10 @@ index 3620550..b5b3056 100644 /* initialize renderer -- init its raster */ static FT_Error -@@ -34,65 +46,2278 @@ - FT_Library library = FT_MODULE_LIBRARY( render ); - +@@ -93,6 +105,2219 @@ + FT_Outline_Get_CBox( &slot->outline, cbox ); + } -- render->clazz->raster_class->raster_reset( render->raster, -- library->raster_pool, -- library->raster_pool_size ); -+ render->clazz->raster_class->raster_reset( render->raster, -+ library->raster_pool, -+ library->raster_pool_size ); -+ -+ return 0; -+ } -+ -+ -+ /* sets render-specific mode */ -+ static FT_Error -+ ft_smooth_set_mode( FT_Renderer render, -+ FT_ULong mode_tag, -+ FT_Pointer data ) -+ { -+ /* we simply pass it to the raster */ -+ return render->clazz->raster_class->raster_set_mode( render->raster, -+ mode_tag, -+ data ); -+ } -+ -+ /* transform a given glyph image */ -+ static FT_Error -+ ft_smooth_transform( FT_Renderer render, -+ FT_GlyphSlot slot, -+ const FT_Matrix* matrix, -+ const FT_Vector* delta ) -+ { -+ FT_Error error = FT_Err_Ok; -+ -+ -+ if ( slot->format != render->glyph_format ) -+ { -+ error = FT_THROW( Invalid_Argument ); -+ goto Exit; -+ } -+ -+ if ( matrix ) -+ FT_Outline_Transform( &slot->outline, matrix ); -+ -+ if ( delta ) -+ FT_Outline_Translate( &slot->outline, delta->x, delta->y ); -+ -+ Exit: -+ return error; -+ } -+ -+ -+ /* return the glyph's control box */ -+ static void -+ ft_smooth_get_cbox( FT_Renderer render, -+ FT_GlyphSlot slot, -+ FT_BBox* cbox ) -+ { -+ FT_MEM_ZERO( cbox, sizeof ( *cbox ) ); -+ -+ if ( slot->format == render->glyph_format ) -+ FT_Outline_Get_CBox( &slot->outline, cbox ); -+ } -+ +#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET + static FT_Fixed FT_FixedFromFloat(float f) + { @@ -4572,45 +4525,23 @@ index 3620550..b5b3056 100644 + /* sort stems in x direction */ + if ( valid_stems > 1 && stems[0].center > stems[1].center ) + swap_stem ( &stems[0], &stems[1] ); - -- return 0; -- } ++ + if ( valid_stems == 0 && known_stem_values->stem_translating != 0 ) + { + *translate_value += known_stem_values->stem_translating; - ++ + if ( strategy_use_strengths ) + { + /* consider 1/2 pixel the max when strength is at 100%, + unless translate is already greater than that */ + FT_Int strength_cutoff = 32; - -- /* sets render-specific mode */ -- static FT_Error -- ft_smooth_set_mode( FT_Renderer render, -- FT_ULong mode_tag, -- FT_Pointer data ) -- { -- /* we simply pass it to the raster */ -- return render->clazz->raster_class->raster_set_mode( render->raster, -- mode_tag, -- data ); -- } - -- /* transform a given glyph image */ -- static FT_Error -- ft_smooth_transform( FT_Renderer render, -- FT_GlyphSlot slot, -- const FT_Matrix* matrix, -- const FT_Vector* delta ) -- { -- FT_Error error = FT_Err_Ok; ++ ++ + if ( abs ( *translate_value ) > strength_cutoff) + strength_cutoff = *translate_value; - ++ + max_strength = ( strength_cutoff * alignment_strength ) / 100; - -- if ( slot->format != render->glyph_format ) ++ + if ( *translate_value < -max_strength ) + *translate_value = -max_strength; + else if ( *translate_value > max_strength ) @@ -4619,8 +4550,7 @@ index 3620550..b5b3056 100644 + } + else + /* Start snapping */ - { -- error = FT_THROW( Invalid_Argument ); ++ { + FT_Int center_offset; + FT_Int modulus; + FT_Int delta, delta2; @@ -5058,19 +4988,13 @@ index 3620550..b5b3056 100644 + printf ( "TRANSLATING -64 " ); + } + } - goto Exit; - } - -- if ( matrix ) -- FT_Outline_Transform( &slot->outline, matrix ); ++ goto Exit; ++ } ++ + Exit: - -- if ( delta ) -- FT_Outline_Translate( &slot->outline, delta->x, delta->y ); ++ +#define transformed_point( point ) point * *scale_value + *translate_value * 12 - -- Exit: -- return error; ++ + if ( strategy_correct_out_of_bounds_outlines ) + { + /* Correct if outside bitmap */ @@ -5092,31 +5016,24 @@ index 3620550..b5b3056 100644 + free ( stem_centers ); + free ( stems ); + free ( leftmost_segment ); - } - - -- /* return the glyph's control box */ ++ } ++ ++ + /* Gamma correction */ - static void -- ft_smooth_get_cbox( FT_Renderer render, -- FT_GlyphSlot slot, -- FT_BBox* cbox ) ++ static void + _ft_lcd_gamma_correction_correction ( FT_Bitmap* bitmap, + FT_Render_Mode mode, + FT_GlyphSlot slot, + float gamma_correction_lt, + float gamma_correction_value ) - { -- FT_MEM_ZERO( cbox, sizeof ( *cbox ) ); ++ { + if ( gamma_correction_value != 1.0 ) + { + FT_UInt width = (FT_UInt)bitmap->width; + FT_UInt height = (FT_UInt)bitmap->rows; + FT_Byte* line = bitmap->buffer; + float ppem = (float)slot->face->size->metrics.x_ppem; - -- if ( slot->format == render->glyph_format ) -- FT_Outline_Get_CBox( &slot->outline, cbox ); ++ + + if ( !slot->face || !slot->face->size ) return; + @@ -5147,8 +5064,8 @@ index 3620550..b5b3056 100644 + } + } + } - } - ++ } ++ +#endif /* convert a slot's glyph image into a bitmap */ @@ -5173,8 +5090,8 @@ index 3620550..b5b3056 100644 #endif + FT_Bitmap* bitmap = &slot->bitmap; + FT_Memory memory = render->root.memory; - FT_Int hmul = mode == FT_RENDER_MODE_LCD; - FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; + FT_Int hmul = ( mode == FT_RENDER_MODE_LCD ); + FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V ); + FT_Pos x_shift = 0; + FT_Pos y_shift = 0; + FT_Pos x_left, y_top; @@ -5209,7 +5126,7 @@ index 3620550..b5b3056 100644 + + FT_Int brightness_value = 0.0; + FT_Int contrast_value = 0.0; -+ + + FT_Int snapping_sliding_scale_value = 0; + + FT_Int global_embolden_x_value = 0; @@ -5268,7 +5185,7 @@ index 3620550..b5b3056 100644 + + brightness_value=ftinf->brightness; + contrast_value=ftinf->contrast; - ++ + windows_style_sharpening_strength=ftinf->windows_style_sharpening_strength; + + /* Decrease effect slightly to have a more linear increase in sharpness */ @@ -5772,11 +5689,10 @@ index 3620550..b5b3056 100644 if ( have_buffer ) { FT_FREE( bitmap->buffer ); -diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c -index 1c1d7de..bd37b44 100644 ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -5610,6 +5610,7 @@ +diff -ruN freetype-2.7-orig/src/truetype/ttinterp.c freetype-2.7/src/truetype/ttinterp.c +--- freetype-2.7-orig/src/truetype/ttinterp.c 2016-09-08 08:53:04.000000000 +0200 ++++ freetype-2.7/src/truetype/ttinterp.c 2016-09-09 16:01:22.468500777 +0200 +@@ -5721,6 +5721,7 @@ if ( exc->ignore_x_mode && exc->GS.freeVector.x != 0 && @@ -5784,194 +5700,3 @@ index 1c1d7de..bd37b44 100644 !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) control_value_cutin = 0; } -diff --git a/src/base/ftinf_rh.c b/src/base/ftinf_rh.c -index 4cd6f1a..606b567 100644 ---- a/src/base/ftinf_rh.c -+++ b/src/base/ftinf_rh.c -@@ -1,5 +1,5 @@ - /* ANSI-C code produced by gperf version 3.1 */ --/* Command-line: gperf ftinf_rh.gperf */ -+/* Command-line: gperf --output-file=ftinf_rh.c ftinf_rh.gperf */ - /* Computed positions: -k'1,$' */ - - #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ -@@ -612,13 +612,11 @@ ftinf_rules( const char *name ){ - char buf[max_wlen+1]; - int len=strlen( name ); - if( len <= max_wlen ){ -- const sa_rules_t *p; - int i; - for( i=0; iwarping = 0; - #endif - module->no_stem_darkening = TRUE; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if(ftinf) module->no_stem_darkening = !ftinf->stem_darkening_autofit; -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - - module->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1; - module->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1; -diff -urN freetype-2.6.2.orig/src/base/ftinf.c freetype-2.6.2/src/base/ftinf.c ---- a/src/base/ftinf.c 2015-12-07 12:42:05.976290812 +0000 -+++ b/src/base/ftinf.c 2015-12-08 09:55:29.149551250 +0000 -@@ -235,6 +235,10 @@ - if( s ) sscanf( s, "%d", &_env.stem_snapping_sliding_scale ); - s=getenv( "INFINALITY_FT_STEM_ALIGNMENT_STRENGTH" ); - if( s ) sscanf( s, "%d", &_env.stem_alignment_strength ); -+ s=getenv( "INFINALITY_FT_STEM_DARKENING_AUTOFIT" ); -+ if( s ) _env.stem_darkening_autofit=bool_val( s ); -+ s=getenv( "INFINALITY_FT_STEM_DARKENING_CFF" ); -+ if( s ) _env.stem_darkening_cff=bool_val( s ); - s=getenv( "INFINALITY_FT_STEM_FITTING_STRENGTH" ); - if( s ) sscanf( s, "%d", &_env.stem_fitting_strength ); - s=getenv( "INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH" ); -diff -urN freetype-2.6.2.orig/src/base/ftinf.h freetype-2.6.2/src/base/ftinf.h ---- a/src/base/ftinf.h 2015-12-07 12:42:05.976290812 +0000 -+++ b/src/base/ftinf.h 2015-12-08 09:53:54.557327499 +0000 -@@ -42,6 +42,8 @@ - int global_embolden_y_value; - int grayscale_filter_strength; - int stem_alignment_strength; -+ int stem_darkening_autofit; -+ int stem_darkening_cff; - int stem_fitting_strength; - int stem_snapping_sliding_scale; - int use_known_settings_on_selected_fonts; -diff -urN freetype-2.6.2.orig/src/cff/cffobjs.c freetype-2.6.2/src/cff/cffobjs.c ---- a/src/cff/cffobjs.c 2015-12-07 12:42:05.972957515 +0000 -+++ b/src/cff/cffobjs.c 2015-12-08 09:56:23.342283975 +0000 -@@ -34,6 +34,9 @@ - - #include "cfferrs.h" - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+#include "../base/ftinf.h" -+#endif - - /*************************************************************************/ - /* */ -@@ -1053,6 +1056,9 @@ - #endif - - driver->no_stem_darkening = TRUE; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if(ftinf) driver->no_stem_darkening = !ftinf->stem_darkening_cff; -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - - driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1; - driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1; - -diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c -index 742e767..6f444fa 100644 ---- a/src/autofit/aflatin.c -+++ b/src/autofit/aflatin.c -@@ -2418,12 +2418,15 @@ FT_Pos infinality_cur_width = 0; - abs( axis->widths[0].cur - infinality_dist ) < 32 && - axis->widths[0].cur > 52 ) - { -- if ( strstr( metrics->root.scaler.face->style_name, "Regular" ) || -- strstr( metrics->root.scaler.face->style_name, "Book" ) || -- strstr( metrics->root.scaler.face->style_name, "Medium" ) || -- strcmp( metrics->root.scaler.face->style_name, "Italic" ) == 0 || -- strcmp( metrics->root.scaler.face->style_name, "Oblique" ) == 0 ) -- { -+ const char *style_name=metrics->root.scaler.face->style_name; -+ if ( style_name!=NULL && -+ ( strstr( style_name, "Regular" ) || -+ strstr( style_name, "Book" ) || -+ strstr( style_name, "Medium" ) || -+ strcmp( style_name, "Italic" ) == 0 || -+ strcmp( style_name, "Oblique" ) == 0 ) -+ ) -+ { - /* regular weight */ - if ( axis->widths[0].cur < 64 ) - infinality_dist = 64; diff --git a/freetype-infinality-ultimate/freetype-2.2.1-enable-valid.patch b/freetype-infinality-ultimate/freetype-2.2.1-enable-valid.patch index c78b6b7..9d4f2ab 100644 --- a/freetype-infinality-ultimate/freetype-2.2.1-enable-valid.patch +++ b/freetype-infinality-ultimate/freetype-2.2.1-enable-valid.patch @@ -1,20 +1,118 @@ ---- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400 + + + +rpms/freetype.git - freetype + + + + + + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: 21d80da5f3ba08bc5589bb3e6f90afcd64120d3b (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+
--- freetype-2.2.1/modules.cfg.orig	2006-07-07 21:01:09.000000000 -0400
 +++ freetype-2.2.1/modules.cfg	2006-07-07 21:01:54.000000000 -0400
 @@ -110,7 +110,7 @@
- AUX_MODULES += cache
- 
  # TrueType GX/AAT table validation.  Needs ftgxval.c below.
+ #
+ # No FT_CONFIG_OPTION_PIC support.
 -# AUX_MODULES += gxvalid
 +AUX_MODULES += gxvalid
  
  # Support for streams compressed with gzip (files with suffix .gz).
  #
 @@ -124,7 +124,7 @@
- 
  # OpenType table validation.  Needs ftotval.c below.
  #
+ # No FT_CONFIG_OPTION_PIC support.
 -# AUX_MODULES += otvalid
 +AUX_MODULES += otvalid
  
  # Auxiliary PostScript driver component to share common code.
  #
+
+
+ +
+ + diff --git a/freetype-infinality-ultimate/freetype-2.3.0-enable-spr.patch b/freetype-infinality-ultimate/freetype-2.3.0-enable-spr.patch new file mode 100644 index 0000000..991fac6 --- /dev/null +++ b/freetype-infinality-ultimate/freetype-2.3.0-enable-spr.patch @@ -0,0 +1,100 @@ + + + +rpms/freetype.git - freetype + + + + + + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: 8432e28a412f0299957a5a67dd16dbdbe025d326 (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+
--- 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.                */
+   /*                                                                       */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ 
+ 
+   /*************************************************************************/
+
+
+ +
+ + diff --git a/freetype-infinality-ultimate/freetype-2.6.5-libtool.patch b/freetype-infinality-ultimate/freetype-2.6.5-libtool.patch new file mode 100644 index 0000000..ebf8024 --- /dev/null +++ b/freetype-infinality-ultimate/freetype-2.6.5-libtool.patch @@ -0,0 +1,100 @@ + + + +rpms/freetype.git - freetype + + + + + + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: e7d0a5c58b4bbc3fa92dc0d5d137f7a5a7f21576 (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+
--- freetype-2.6.5/builds/unix/freetype-config.in
++++ freetype-2.6.5/builds/unix/freetype-config.in
+@@ -158,7 +154,7 @@ fi
+ 
+ if test "$echo_libtool" = "yes" ; then
+   convlib="libfreetype.la"
+-  echo ${SYSROOT}$libdir/$convlib
++  #echo ${SYSROOT}$libdir/$convlib
+ fi
+ 
+ # EOF
+
+
+ +
+ + diff --git a/freetype-infinality-ultimate/freetype-infinality-ultimate.spec b/freetype-infinality-ultimate/freetype-infinality-ultimate.spec index f240846..4b7b020 100644 --- a/freetype-infinality-ultimate/freetype-infinality-ultimate.spec +++ b/freetype-infinality-ultimate/freetype-infinality-ultimate.spec @@ -2,7 +2,7 @@ Summary: A free and portable font rendering engine Name: freetype-infinality-ultimate -Version: 2.6.3 +Version: 2.7.1 Release: 1%{?dist} License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement Group: System Environment/Libraries @@ -15,10 +15,13 @@ Source4: infinality-settings.sh Source5: infinality-settings-generic Source6: xft-settings.sh -Patch1: freetype-2.2.1-enable-valid.patch Patch2: 02-upstream-2016.03.26.patch -Patch3: 03-infinality-2.6.3-2016.03.26.patch +Patch3: 03-infinality-2.7-2016.09.09.patch +Patch21: freetype-2.3.0-enable-spr.patch + +# Enable otvalid and gxvalid modules +Patch46: freetype-2.2.1-enable-valid.patch # Enable additional demos Patch47: freetype-2.5.2-more-demos.patch @@ -28,6 +31,8 @@ Patch88: freetype-multilib.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1161963 Patch92: freetype-2.5.3-freetype-config-prefix.patch +Patch93: freetype-2.6.5-libtool.patch + BuildRequires: libX11-devel BuildRequires: libpng-devel BuildRequires: zlib-devel @@ -86,10 +91,14 @@ FreeType. %prep %setup -q -b 1 -a 2 -n freetype-%{version} -%patch1 -p1 -b .enable-valid -%patch2 -p1 -b .upstream +# %patch2 -p1 -b .upstream %patch3 -p1 -b .infinality +%patch46 -p1 -b .enable-valid + +%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} +%patch21 -p1 -b .enable-spr +%endif pushd ft2demos-%{version} %patch47 -p1 -b .more-demos @@ -99,6 +108,8 @@ popd %patch92 -p1 -b .freetype-config-prefix +%patch93 -p1 -b .libtool + cp %{SOURCE4} . cp %{SOURCE5} .