Hello community, here is the log from the commit of package freetype2 for openSUSE:Factory checked in at Thu Aug 4 08:59:27 CEST 2011. -------- --- freetype2/freetype2.changes 2011-02-28 17:37:02.000000000 +0100 +++ /mounts/work_src_done/STABLE/freetype2/freetype2.changes 2011-07-22 13:42:52.000000000 +0200 @@ -1,0 +2,43 @@ +Fri Jul 22 13:41:02 CEST 2011 - ke@suse.de + +- added bnc704612_othersubr.diff, CVE-2011-0226, bnc#704612. + +------------------------------------------------------------------- +Thu Jul 7 13:16:05 UTC 2011 - idonmez@novell.com + +- Clean spec file +- Disable static libraries +- Drop unneeded use_unix.diff +- Disable newly introduced bzip2 support, it seems to create + problems with subpixel rendering + +------------------------------------------------------------------- +Sat Jun 25 08:37:55 UTC 2011 - idonmez@novell.com + +- Update to version 2.4.5 + * A rendering regression for second-order Bézier curves has been + fixed, introduced in 2.4.3. + * If autohinting is not explicitly disabled, FreeType now uses + the autohinter if a TrueType based font doesn't contain native + hints. + * The load flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH has been made + redundant and is simply ignored; this means that FreeType now + ignores the global advance width value in TrueType fonts. + * `FT_Sfnt_Table_Info' can now return the number of SFNT tables of + a font. + * Support for PCF files compressed with bzip2 has been contributed + by Joel Klinghed. To make this work, the OS must provide a + bzip2 library. + * Again some fixes to better handle broken fonts. + * Some improvements to the B/W rasterizer. + * Fixes to the cache module to improve robustness. + * Just Fill Bugs contributed (experimental) code to compute blue + zones for CJK Ideographs, improving the alignment of horizontal + stems at the top or bottom edges. +- Dropped the following patches: + * bnc628213_1797.diff (fixed upstream) + * bnc641580_CVE-2010-3311.diff (fixed upstream) + * ft2-stream-compat.diff (only needed for SLE8->SLE9 update) +- Add libbz2-devel to BuildRequires to enable bzip2 support + +------------------------------------------------------------------- --- freetype2/ft2demos.changes 2011-02-25 13:07:43.000000000 +0100 +++ /mounts/work_src_done/STABLE/freetype2/ft2demos.changes 2011-07-22 13:42:52.000000000 +0200 @@ -1,0 +2,18 @@ +Fri Jul 22 13:41:52 CEST 2011 - ke@suse.de + +- added bnc704612_othersubr.diff, CVE-2011-0226, bnc#704612. + +------------------------------------------------------------------- +Thu Jul 7 13:20:45 UTC 2011 - idonmez@novell.com + +- Cleanup spec file +- Drop unneeded use_unix.diff + +------------------------------------------------------------------- +Sat Jun 25 08:43:59 UTC 2011 - idonmez@novell.com + +- Update to version 2.4.5 + * The `ftgrid' demo program can now display autohinter segments, + to be toggled on and off with key `s'. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- bnc628213_1797.diff bnc641580_CVE-2010-3311.diff freetype-2.4.4.tar.bz2 freetype-doc-2.4.4.tar.bz2 ft2-stream-compat.diff ft2demos-2.4.4.tar.bz2 use_unix.diff New: ---- bnc704612_othersubr.diff freetype-2.4.5.tar.bz2 freetype-doc-2.4.5.tar.bz2 ft2demos-2.4.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ freetype2.spec ++++++ --- /var/tmp/diff_new_pack.Pt8AAp/_old 2011-08-04 08:57:36.000000000 +0200 +++ /var/tmp/diff_new_pack.Pt8AAp/_new 2011-08-04 08:57:36.000000000 +0200 @@ -15,42 +15,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: freetype2 -BuildRequires: pkg-config zlib-devel License: Freetype License (BSD-like). See http://freetype.sourceforge.net/FTL.TXT Group: System/Libraries -AutoReqProv: on +BuildRequires: pkg-config +BuildRequires: zlib-devel # bug437293 %ifarch ppc64 Obsoletes: freetype2-64bit %endif # -Version: 2.4.4 -Release: 9 -Url: http://www.freetype.org +Version: 2.4.5 +Release: 1 Summary: A TrueType Font Library -# CVS repository: -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype login -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype co freetype2 -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype co ft2demos +Url: http://www.freetype.org Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2 Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2 Source3: baselibs.conf Patch3: freetype2-bitmap-foundry.patch -Patch4: ft2-stream-compat.diff Patch9: fix-build.patch Patch10: freetype2-no_rpath.patch Patch308961: bugzilla-308961-cmex-workaround.patch Patch200: freetype2-subpixel.patch -Patch201: use_unix.diff - -Patch1000: bnc628213_1797.diff -Patch1015: bnc641580_CVE-2010-3311.diff -Source1015: bug-641580_CVE-2010-3311.cff - +Patch1018: bnc704612_othersubr.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -72,12 +61,14 @@ License: GPLv2+ ; Freetype License (BSD-like). See http://freetype.sourceforge.net/FTL.TXT Summary: Development environment for the freetype2 TrueType font library Group: Development/Libraries/C and C++ -Requires: libfreetype6 = %{version}, zlib-devel +Requires: libfreetype6 = %{version} +Requires: zlib-devel # bug437293 %ifarch ppc64 Obsoletes: freetype2-devel-64bit %endif -# +# there is no freetype-devel on suse: +Provides: freetype-devel %description devel This package contains all necessary include files, libraries and @@ -90,58 +81,30 @@ %define enable_subpixel_rendering 0 %setup -q -n freetype-%{version} -a 1 %patch3 -p 1 -b .bitmap-foundry -%patch4 -p 1 -b .ft2-stream-compat -#%patch8 -p 1 %patch9 -p 1 %patch10 %patch308961 -p 1 %if %{enable_subpixel_rendering} %patch200 -p 1 -b .subpixel %endif -%patch201 -p1 +%patch1018 -p 1 -b .othersubr -# bnc628213_1797.diff -%patch1000 -p1 -# bnc629447_CVE-2010-2805..8.diff -#%patch1001 -p1 -#%patch1002 -p1 -#%patch1003 -p1 -#%patch1004 -p1 -# bnc619562_CVE-2010-2497..2541.diff -#%patch1005 -p1 -#%patch1006 -p1 -#%patch1007 -p1 -#%patch1008 -p1 -#%patch1009 -p1 -#%patch1010 -p1 -# bnc633938_CVE-2010-3053.diff -#%patch1013 -p1 -# bnc641580_CVE-2010-3311.diff -%patch1015 -p1 - -find . -name CVS -type d | xargs rm -rf -find . -name ".cvsignore" | xargs rm -f -cp /usr/share/automake*/config.{guess,sub} builds/unix rm docs/reference/.gitignore %build -export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing" %ifarch arm export CFLAGS="$CFLAGS -std=gnu99" %endif -ln -s /usr/bin/libtool ./builds/unix/libtool -make setup CFG="--prefix=/usr --libdir=%{_libdir} --with-zlib" -make prefix=/usr libdir=%{_libdir} %{?jobs:-j %jobs} -# build the documentation in the references subdirectory: -# (this needs python and we cannot have python in the BuildRequires of -# a basic package like freetype2, therefore we cannot do it here but we have -# to generate this documentation manually) -#make refdoc +%configure --without-bzip2 \ + --disable-static +make %{_smp_mflags} %install +%makeinstall + # these development documents should go into the freetype2-devel package: mv docs/reference freetype-%{version}/docs -make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install + # remove documentation that does not belong in an rpm rm docs/INSTALL* @@ -161,11 +124,11 @@ %files devel %defattr(-,root,root) %doc freetype-%{version}/docs/* -/usr/include/* +%{_includedir}/* %exclude %{_libdir}/libfreetype.*a %{_libdir}/libfreetype.so %{_libdir}/pkgconfig/freetype2.pc -/usr/bin/* -/usr/share/aclocal/* +%{_bindir}/* +%{_datadir}/aclocal/* %changelog ++++++ ft2demos.spec ++++++ --- /var/tmp/diff_new_pack.Pt8AAp/_old 2011-08-04 08:57:36.000000000 +0200 +++ /var/tmp/diff_new_pack.Pt8AAp/_new 2011-08-04 08:57:36.000000000 +0200 @@ -15,42 +15,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: ft2demos -BuildRequires: xorg-x11-devel +Version: 2.4.5 +Release: 1 License: GPLv2+ -Group: Productivity/Publishing/Other -AutoReqProv: on -Supplements: fonts-config -Version: 2.4.4 -Release: 4 +Summary: Freetype2 Utilities and Demo Programs %define freetype_version %{version} Url: http://www.freetype.org -Summary: Freetype2 Utilities and Demo Programs -# CVS repository: -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype login -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype co freetype2 -# cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/freetype co ft2demos +Group: Productivity/Publishing/Other Source0: http://savannah.nongnu.org/download/freetype/freetype-%{version}.tar.bz2 -# Uncomment to save space: -#NoSource: 0 Source1: http://savannah.nongnu.org/download/freetype/ft2demos-%{version}.tar.bz2 -Patch4: ft2-stream-compat.diff Patch9: fix-build.patch Patch308961: bugzilla-308961-cmex-workaround.patch Patch50: ft2demos-build-testname.patch Patch200: freetype2-subpixel.patch -Patch201: use_unix.diff +BuildRequires: xorg-x11-devel +Supplements: fonts-config -Patch1000: bnc628213_1797.diff Source1000: bnc628213_test.otf Source1004: bnc629447_sigsegv31.ttf Source1013: bnc633938_badbdf.0 -Patch1015: bnc641580_CVE-2010-3311.diff Source1015: bug-641580_CVE-2010-3311.cff Source1016: bug-647375_tt2.ttf +Patch1018: bnc704612_othersubr.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -60,9 +49,6 @@ %prep %define enable_subpixel_rendering 0%{?opensuse_bs} %setup -n freetype-%{freetype_version} -b 1 -%patch4 -p 1 -b .ft2-stream-compat -#%patch5 -p 1 -#%patch8 -p 1 %patch9 -p 1 %patch308961 -p 1 pushd ../ft2demos-%{version} @@ -71,66 +57,30 @@ %if %{enable_subpixel_rendering} %patch200 -p 1 -b .subpixel %endif -%patch201 -p1 - -# bnc628213_1797.diff -%patch1000 -p1 -# bnc629447_CVE-2010-2805..8.diff -#%patch1001 -p1 -#%patch1002 -p1 -#%patch1003 -p1 -#%patch1004 -p1 -# bnc619562_CVE-2010-2497..2541.diff -#%patch1005 -p1 -#%patch1006 -p1 -#%patch1007 -p1 -#%patch1008 -p1 -#%patch1009 -p1 -#%patch1010 -p1 -pushd ../ft2demos-%{version} -#%patch1011 -p1 -#%patch1012 -p1 -popd -# bnc633938_CVE-2010-3053.diff -#%patch1013 -p1 -# bnc641580_CVE-2010-3311.diff -%patch1015 -p1 - -find . -name CVS -type d | xargs rm -rf -find . -name ".cvsignore" | xargs rm -f -cp /usr/share/automake*/config.{guess,sub} builds/unix +%patch1018 -p 1 -b .othersubr %build -export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing " -ln -s /usr/bin/libtool ./builds/unix/libtool -make setup CFG="--prefix=/usr --libdir=%{_libdir} --with-zlib" -make prefix=/usr libdir=%{_libdir} %{?jobs:-j %jobs} -# build the documentation in the references subdirectory: -# (this needs python and we cannot have python in the BuildRequires of -# a basic package like freetype2, therefore we cannot do it here but we have -# to generate this documentation manually) -# make refdoc +%configure --without-bzip2 +make %{_smp_mflags} + pushd .. ln -s freetype-%{freetype_version} freetype2 cd ft2demos-%{version} - make prefix=/usr libdir=%{_libdir} \ - X11_PATH="/usr/X11R6" \ - LDFLAGS="-L/usr/X11R6/%{_lib} -lm " + make %{_smp_mflags} popd %install -#make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install -mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p %{buildroot}%{_bindir} pushd ../ft2demos-%{version}/bin/.libs - install -m 755 ft* $RPM_BUILD_ROOT%{_bindir} + install -m 755 ft* %{buildroot}%{_bindir} popd %check -$RPM_BUILD_ROOT/usr/bin/ftbench -c 1 %{S:1000} -$RPM_BUILD_ROOT/usr/bin/ftbench -c 1 %{S:1004} |& grep -v "couldn't load font resource" && echo "should fail" -$RPM_BUILD_ROOT/usr/bin/ftbench -c 1 %{S:1013} |& grep -v "couldn't load font resource" && echo "should fail" -$RPM_BUILD_ROOT/usr/bin/ftbench -c 1 %{S:1015} |& grep -v "couldn't load font resource" && echo "should fail" -$RPM_BUILD_ROOT/usr/bin/ftbench -c 1 %{S:1016} +%{buildroot}%{_bindir}/ftbench -c 1 %{S:1000} +%{buildroot}%{_bindir}/ftbench -c 1 %{S:1004} |& grep -v "couldn't load font resource" && echo "should fail" +%{buildroot}%{_bindir}/ftbench -c 1 %{S:1013} |& grep -v "couldn't load font resource" && echo "should fail" +%{buildroot}%{_bindir}/ftbench -c 1 %{S:1015} |& grep -v "couldn't load font resource" && echo "should fail" +%{buildroot}%{_bindir}/ftbench -c 1 %{S:1016} %clean ++++++ bnc704612_othersubr.diff ++++++ --- freetype-2.4.4/src/psaux/t1decode.c.orig 2011-07-21 16:44:40.000000000 +0000 +++ freetype-2.4.4/src/psaux/t1decode.c 2011-07-21 17:00:05.000000000 +0000 @@ -28,6 +28,8 @@ #include "psauxerr.h" +/* ensure proper sign extension */ +#define Fix2Int( f ) ( (FT_Int)(FT_Short)( (f) >> 16 ) ) /*************************************************************************/ /* */ @@ -662,7 +664,7 @@ if ( large_int ) FT_TRACE4(( " %ld", value )); else - FT_TRACE4(( " %ld", (FT_Int32)( value >> 16 ) )); + FT_TRACE4(( " %ld", Fix2Int( value ) )); #endif *top++ = value; @@ -684,8 +686,8 @@ top -= 2; - subr_no = (FT_Int)( top[1] >> 16 ); - arg_cnt = (FT_Int)( top[0] >> 16 ); + subr_no = Fix2Int( top[1] ); + arg_cnt = Fix2Int( top[0] ); /***********************************************************/ /* */ @@ -862,7 +864,7 @@ if ( arg_cnt != 1 || blend == NULL ) goto Unexpected_OtherSubr; - idx = (FT_Int)( top[0] >> 16 ); + idx = Fix2Int( top[0] ); if ( idx < 0 || idx + blend->num_designs > decoder->len_buildchar ) @@ -930,7 +932,7 @@ if ( arg_cnt != 2 || blend == NULL ) goto Unexpected_OtherSubr; - idx = (FT_Int)( top[1] >> 16 ); + idx = Fix2Int( top[1] ); if ( idx < 0 || (FT_UInt) idx >= decoder->len_buildchar ) goto Unexpected_OtherSubr; @@ -951,7 +953,7 @@ if ( arg_cnt != 1 || blend == NULL ) goto Unexpected_OtherSubr; - idx = (FT_Int)( top[0] >> 16 ); + idx = Fix2Int( top[0] ); if ( idx < 0 || (FT_UInt) idx >= decoder->len_buildchar ) goto Unexpected_OtherSubr; @@ -1009,11 +1011,15 @@ break; default: - FT_ERROR(( "t1_decoder_parse_charstrings:" - " unknown othersubr [%d %d], wish me luck\n", - arg_cnt, subr_no )); - unknown_othersubr_result_cnt = arg_cnt; - break; + if ( arg_cnt >= 0 && subr_no >= 0 ) + { + FT_ERROR(( "t1_decoder_parse_charstrings:" + " unknown othersubr [%d %d], wish me luck\n", + arg_cnt, subr_no )); + unknown_othersubr_result_cnt = arg_cnt; + break; + } + /* fall through */ Unexpected_OtherSubr: FT_ERROR(( "t1_decoder_parse_charstrings:" @@ -1139,8 +1145,8 @@ top[0], top[1], top[2], - (FT_Int)( top[3] >> 16 ), - (FT_Int)( top[4] >> 16 ) ); + Fix2Int( top[3] ), + Fix2Int( top[4] ) ); case op_sbw: FT_TRACE4(( " sbw" )); @@ -1324,7 +1330,7 @@ FT_TRACE4(( " callsubr" )); - idx = (FT_Int)( top[0] >> 16 ); + idx = Fix2Int( top[0] ); if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs ) { FT_ERROR(( "t1_decoder_parse_charstrings:" ++++++ freetype-2.4.4.tar.bz2 -> freetype-2.4.5.tar.bz2 ++++++ ++++ 34705 lines of diff (skipped) ++++++ freetype-doc-2.4.4.tar.bz2 -> freetype-doc-2.4.5.tar.bz2 ++++++ ++++ 1696 lines of diff (skipped) ++++++ freetype2-no_rpath.patch ++++++ --- /var/tmp/diff_new_pack.Pt8AAp/_old 2011-08-04 08:57:37.000000000 +0200 +++ /var/tmp/diff_new_pack.Pt8AAp/_new 2011-08-04 08:57:37.000000000 +0200 @@ -16,6 +16,6 @@ - if test "$enable_shared" = "yes" ; then - eval "rpath="$hardcode_libdir_flag_spec"" - fi - libs="-lfreetype @LIBZ@ @FT2_EXTRA_LIBS@" + libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@" if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then echo -L${SYSROOT}$libdir $libs ++++++ ft2demos-2.4.4.tar.bz2 -> ft2demos-2.4.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/ChangeLog new/ft2demos-2.4.5/ChangeLog --- old/ft2demos-2.4.4/ChangeLog 2010-11-28 16:28:48.000000000 +0100 +++ new/ft2demos-2.4.5/ChangeLog 2011-06-25 08:18:32.000000000 +0200 @@ -1,3 +1,121 @@ +2011-06-24 Werner Lemberg <wl@gnu.org> + + * Version 2.4.5 released. + ========================= + + + Tag sources with `VER-2-4-5'. + + * README: Updated. + +2011-06-01 Werner Lemberg <wl@gnu.org> + + Fix gcc 4.6 warnings. + + * graph/grblit.c (blit_gray_to_gray): Remove unused variables. + (blit_gray_to_gray_simple): Declare and set `max' conditionally. + + * src/ftcommon.c (FTDemo_Index_To_Bitmap): Remove unused variable. + * src/ftmulti.c (Render_All, Render_Text): Ditto. + * src/ftview.c (INIT_SIZE, Render_Stroke, Render_Slanted, + Render_Embolden, Render_All, Render_Text, Render_Waterfall): Ditto. + +2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au> + Werner Lemberg <wl@gnu.org> + + [ftgrid] Show autohinter segments. Toggle with key `s'. + + * src/ftgrid.c: Add declarations for + `af_glyph_hints_get_num_segments' and + `af_glyph_hints_get_segments_offset'. + (GridStatus): Add `segment_color' and `do_segment'. + (grid_status_init): Updated. + (grid_hint_draw_segment): New function. + (grid_status_draw_outline): Call it. + (Process_Event) <'s'>: Toggle display of segment lines. + (event_help): Udpated. + +2011-04-24 Werner Lemberg <wl@gnu.org> + + * src/ftgrid.c (event_grid_zoom): Fix status message. + +2011-04-21 Werner Lemberg <wl@gnu.org> + + FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH is deprecated and ignored. + + * src/ftchkwd.c (check_face): Update load flags. + * src/ftcommon.h (FTDemo_Handle): Remove `use_global_advance_width'. + * src/ftcommon.c (FTDemo_New, FTDemo_Update_Current_Flags): Updated. + * src/ftmulti.c (LoadChar): Update load flags. + + * src/ftdiff.c (ColumnStateRec): Remove `use_global_advance_width'. + (render_state_init, render_state_draw): Udpated. + (process_event): No longer handle key `a'. + (event_help): Updated. + + * src/ftview.c (Process_Event): No longer handle key `A'. + (event_help): Updated. + +2011-04-20 Werner Lemberg <wl@gnu.org> + + [ftgrid]: Prevent incorrect output of `1', `2', and `3' keys. + + * src/ftgrid.c (Process_Event) <'1', '2', '3'>: Ensure that hinting + is active, otherwise old table data could be emitted. + +2011-04-19 Werner Lemberg <wl@gnu.org> + + * Makefile (FT_INCLUDES): Simplify. + +2011-04-18 Werner Lemberg <wl@gnu.org> + + [ftgrid]: Limit autofit control even more. + + * src/ftgrid.c (Process_Event) <'H', 'V', 'B'> [FT_DEBUG_AUTOFIT]: + Limit visibility and improve status messages. + (event_help): Updated. + +2011-04-18 Werner Lemberg <wl@gnu.org> + + [ftgrid] Add forced autohinting and limit autofit dumping. + + * src/ftgrid.c (_af_debug): Remove, unused. + (Process_Event) <'f'>: Toggle autohinting. + [FT_DEBUG_AUTOFIT] <'1', '2', '3'>: Limit visibility and improve + status messages. + (event_help): Updated. + (main): Updated. + +2011-04-18 Werner Lemberg <wl@gnu.org> + + Honor DEVEL_DIR. + + * Makefile (FT_INCLUDES) [DEVEL_DIR]: Add $DEVEL_DIR. + +2011-03-19 Werner Lemberg <wl@gnu.org> + + C++ compilation fixes. + + * src/ftcommon.c, src/ftdiff.c: `strrchr' returns `const char *'. + + * src/ftview.c (status): Fix initialization. + +2011-01-30 Werner Lemberg <wl@gnu.org> + + Add flag `A' to ftview for toggling the global advance width flag. + + * src/ftcommon.h (FTDemo_Handle): New field + `use_global_advance_width'. + * src/ftcommon.c (FTDemo_New): Set it. + (FTDemo_Update_Current_Flags): Handle it. + + * src/ftview.c (Process_Event): Handle key `A'. + (event_help): Updated. + +2010-12-31 Werner Lemberg <wl@gnu.org> + + * Makefile: Add -lbz2 for development builds. + 2010-11-28 Werner Lemberg <wl@gnu.org> * Version 2.4.4 released. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/Makefile new/ft2demos-2.4.5/Makefile --- old/ft2demos-2.4.4/Makefile 2009-10-07 09:57:21.000000000 +0200 +++ new/ft2demos-2.4.5/Makefile 2011-04-19 06:46:37.000000000 +0200 @@ -121,7 +121,11 @@ SRC_DIR := $(TOP_DIR_2)/src endif - FT_INCLUDES := $(OBJ_BUILD) $(BUILD_DIR) $(TOP_DIR)/include $(SRC_DIR) + FT_INCLUDES := $(OBJ_BUILD) \ + $(BUILD_DIR) \ + $(DEVEL_DIR) \ + $(TOP_DIR)/include \ + $(SRC_DIR) COMPILE = $(CC) $(CFLAGS) \ $(INCLUDES:%=$I%) \ @@ -155,7 +159,7 @@ else LINK_CMD = $(CC) $(subst /,$(COMPILER_SEP),$(LDFLAGS)) ifeq ($(PLATFORM),unixdev) - LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) -lm + LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) -lm -lbz2 else LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/README new/ft2demos-2.4.5/README --- old/ft2demos-2.4.4/README 2010-11-28 16:29:02.000000000 +0100 +++ new/ft2demos-2.4.5/README 2011-06-25 08:18:51.000000000 +0200 @@ -8,8 +8,8 @@ downloaded one of the stable FreeType 2 source packages from our server, you most probably have to rename its directory, for example: - mv freetype-2.4.4 freetype2 on Unix - rename freetype-2.4.4 freetype2 on Windows + mv freetype-2.4.5 freetype2 on Unix + rename freetype-2.4.5 freetype2 on Windows WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/graph/grblit.c new/ft2demos-2.4.5/graph/grblit.c --- old/ft2demos-2.4.4/graph/grblit.c 2009-04-26 14:00:12.000000000 +0200 +++ new/ft2demos-2.4.5/graph/grblit.c 2011-06-01 10:40:03.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 1996-1999, 2000, 2001, 2002, 2009 by */ +/* Copyright 1996-2002, 2009, 2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* grblit.c: Support for blitting of bitmaps with various depth. */ @@ -702,11 +702,7 @@ int y; unsigned char* read; unsigned char* write; - unsigned char max1; - unsigned char max2; - max1 = (unsigned char)(blit->source.grays-1); - max2 = (unsigned char)(blit->target.grays-1); read = blit->read + blit->xread; write = blit->write + blit->xwrite; @@ -759,9 +755,12 @@ int y; unsigned char* read; unsigned char* write; +#ifdef GR_CONFIG_GRAY_SKIP_WHITE unsigned char max; - max = (unsigned char)(blit->source.grays-1); + + max = (unsigned char)( blit->source.grays - 1 ); +#endif read = blit->read + blit->xread; write = blit->write + blit->xwrite; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftchkwd.c new/ft2demos-2.4.5/src/ftchkwd.c --- old/ft2demos-2.4.4/src/ftchkwd.c 2009-03-14 14:58:28.000000000 +0100 +++ new/ft2demos-2.4.5/src/ftchkwd.c 2011-04-21 08:27:31.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality font engine */ /* */ -/* Copyright 2003 by */ +/* Copyright 2003, 2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* ftchkwd */ @@ -83,8 +83,7 @@ for ( n = 0; n < face->num_glyphs; n++ ) { /* load the glyph outline */ - error = FT_Load_Glyph( face, n, FT_LOAD_NO_SCALE | - FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ); + error = FT_Load_Glyph( face, n, FT_LOAD_NO_SCALE ); if ( error ) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftcommon.c new/ft2demos-2.4.5/src/ftcommon.c --- old/ft2demos-2.4.4/src/ftcommon.c 2009-03-14 14:58:28.000000000 +0100 +++ new/ft2demos-2.4.5/src/ftcommon.c 2011-06-01 10:40:56.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 2005, 2006, 2007, 2008, 2009 by */ +/* Copyright 2005-2009, 2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -226,7 +226,7 @@ char orig[4]; - suffix = strrchr( font->filepathname, '.' ); + suffix = (char*)strrchr( font->filepathname, '.' ); if ( suffix && ( strcasecmp( suffix, ".pfa" ) == 0 || strcasecmp( suffix, ".pfb" ) == 0 ) ) { @@ -285,16 +285,16 @@ FT_Bitmap_New( &handle->bitmap ); - handle->encoding = encoding; + handle->encoding = encoding; - handle->hinted = 1; - handle->antialias = 1; - handle->use_sbits = 1; - handle->low_prec = 0; - handle->autohint = 0; - handle->lcd_mode = 0; + handle->hinted = 1; + handle->antialias = 1; + handle->use_sbits = 1; + handle->low_prec = 0; + handle->autohint = 0; + handle->lcd_mode = 0; - handle->use_sbits_cache = 1; + handle->use_sbits_cache = 1; /* string_init */ memset( handle->string, 0, sizeof( TGlyph ) * MAX_GLYPHS ); @@ -583,11 +583,10 @@ void FTDemo_Update_Current_Flags( FTDemo_Handle* handle ) { - FT_UInt32 flags, target; + FT_UInt32 flags, target; - flags = FT_LOAD_DEFAULT; /* really 0 */ - flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; + flags = FT_LOAD_DEFAULT; /* really 0 */ if ( handle->autohint ) flags |= FT_LOAD_FORCE_AUTOHINT; @@ -774,7 +773,6 @@ int* y_advance, FT_Glyph* aglyf ) { - int cached_bitmap = 1; int width, height; @@ -841,8 +839,6 @@ target->buffer = handle->bitmap.buffer; target->mode = gr_pixel_mode_gray; target->grays = handle->bitmap.num_grays; - - cached_bitmap = 0; break; case FT_PIXEL_MODE_LCD: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftcommon.h new/ft2demos-2.4.5/src/ftcommon.h --- old/ft2demos-2.4.4/src/ftcommon.h 2009-03-14 14:58:28.000000000 +0100 +++ new/ft2demos-2.4.5/src/ftcommon.h 2011-04-21 08:31:21.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 2005, 2006, 2009 by */ +/* Copyright 2005, 2006, 2009, 2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -157,41 +157,41 @@ typedef struct { - FT_Library library; /* the FreeType library */ - FTC_Manager cache_manager; /* the cache manager */ - FTC_ImageCache image_cache; /* the glyph image cache */ - FTC_SBitCache sbits_cache; /* the glyph small bitmaps cache */ - FTC_CMapCache cmap_cache; /* the charmap cache.. */ - - PFont* fonts; /* installed fonts */ - int num_fonts; - int max_fonts; + FT_Library library; /* the FreeType library */ + FTC_Manager cache_manager; /* the cache manager */ + FTC_ImageCache image_cache; /* the glyph image cache */ + FTC_SBitCache sbits_cache; /* the glyph small bitmaps cache */ + FTC_CMapCache cmap_cache; /* the charmap cache */ + + PFont* fonts; /* installed fonts */ + int num_fonts; + int max_fonts; - int use_sbits_cache; /* toggle sbits cache */ + int use_sbits_cache; /* toggle sbits cache */ /* use FTDemo_Set_Current_XXX to set the following two fields */ - PFont current_font; /* selected font */ - FTC_ScalerRec scaler; - FT_ULong load_flags; + PFont current_font; /* selected font */ + FTC_ScalerRec scaler; + FT_ULong load_flags; /* call FTDemo_Update_Current_Flags after setting any of the following fields */ - int hinted; /* is glyph hinting active? */ - int antialias; /* is anti-aliasing active? */ - int use_sbits; /* do we use embedded bitmaps? */ - int low_prec; /* force low precision */ - int autohint; /* force auto-hinting */ - int lcd_mode; - int preload; /* force font file preloading */ + int hinted; /* is glyph hinting active? */ + int antialias; /* is anti-aliasing active? */ + int use_sbits; /* do we use embedded bitmaps? */ + int low_prec; /* force low precision */ + int autohint; /* force auto-hinting */ + int lcd_mode; + int preload; /* force font file preloading */ /* don't touch the following fields! */ /* used for string rendering */ - TGlyph string[MAX_GLYPHS]; - int string_length; - int string_reload; + TGlyph string[MAX_GLYPHS]; + int string_length; + int string_reload; - FT_Encoding encoding; - FT_Bitmap bitmap; /* used as bitmap conversion buffer */ + FT_Encoding encoding; + FT_Bitmap bitmap; /* used as bitmap conversion buffer */ } FTDemo_Handle; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftdiff.c new/ft2demos-2.4.5/src/ftdiff.c --- old/ft2demos-2.4.4/src/ftdiff.c 2010-06-07 08:55:38.000000000 +0200 +++ new/ft2demos-2.4.5/src/ftdiff.c 2011-04-21 08:32:20.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 2007, 2008, 2009, 2010 by */ +/* Copyright 2007-2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -145,7 +145,6 @@ int use_kerning; int use_deltas; int use_lcd_filter; - int use_global_advance_width; FT_LcdFilter lcd_filter; HintMode hint_mode; DisplayMode disp_mode; @@ -202,14 +201,13 @@ state->char_size = 16; state->display = display[0]; - state->columns[0].use_kerning = 1; - state->columns[0].use_deltas = 1; - state->columns[0].use_lcd_filter = 1; - state->columns[0].use_global_advance_width = 1; - state->columns[0].lcd_filter = FT_LCD_FILTER_DEFAULT; - state->columns[0].hint_mode = HINT_MODE_BYTECODE; - state->columns[0].use_custom_lcd_filter = 0; - state->columns[0].fw_index = 2; + state->columns[0].use_kerning = 1; + state->columns[0].use_deltas = 1; + state->columns[0].use_lcd_filter = 1; + state->columns[0].lcd_filter = FT_LCD_FILTER_DEFAULT; + state->columns[0].hint_mode = HINT_MODE_BYTECODE; + state->columns[0].use_custom_lcd_filter = 0; + state->columns[0].fw_index = 2; /* freetype default filter weights */ memcpy( state->columns[0].filter_weights, "\x10\x40\x70\x40\x10", 5); @@ -391,9 +389,9 @@ } } memcpy( (char*)state->filepath, filepath, len + 1 ); - p = strrchr( state->filepath, '\' ); + p = (char*)strrchr( state->filepath, '\' ); if ( p == NULL ) - p = strrchr( state->filepath, '/' ); + p = (char*)strrchr( state->filepath, '/' ); state->filename = p ? p + 1 : state->filepath; } @@ -455,9 +453,6 @@ if ( rmode == HINT_MODE_UNHINTED ) load_flags |= FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; - if ( !column->use_global_advance_width ) - load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; - for ( ; *p; p++ ) { FT_UInt gindex; @@ -630,13 +625,11 @@ } state->display.disp_text( disp, left, bottom + 15, msg ); - sprintf(temp, "%s %s %s", + sprintf(temp, "%s %s", column->use_kerning ? "+kern" : "-kern", column->use_deltas ? "+delta" - : "-delta", - column->use_global_advance_width ? "+advance" - : "-advance" ); + : "-delta" ); state->display.disp_text( disp, left, bottom + 25, temp ); if ( state->col == idx ) @@ -835,7 +828,6 @@ grWriteln( " n, p select previous/next font" ); grLn(); grWriteln( " 1, 2, 3 select left, middle, or right column" ); - grWriteln( " a toggle `ignore global advance width flag'" ); grWriteln( " d toggle lsb/rsb deltas" ); grWriteln( " h toggle hinting mode" ); grWriteln( " k toggle kerning" ); @@ -955,14 +947,6 @@ state->message = (char *)"column 3 selected"; break; - case grKEY( 'a' ): - column->use_global_advance_width - = !column->use_global_advance_width; - state->message = column->use_global_advance_width - ? (char *)"using global advance width" - : (char *)"ignoring global advance width"; - break; - case grKEY( 'd' ): column->use_deltas = !column->use_deltas; state->message = column->use_deltas diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftgrid.c new/ft2demos-2.4.5/src/ftgrid.c --- old/ft2demos-2.4.4/src/ftgrid.c 2010-06-07 08:57:05.000000000 +0200 +++ new/ft2demos-2.4.5/src/ftgrid.c 2011-05-01 13:36:15.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */ +/* Copyright 1996-2000, 2003-2007, 2009-2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -40,24 +40,35 @@ #endif -/* these variables, structures and declarations are for */ -/* communication with the debugger in the autofit module; */ -/* normal programs don't need this */ -struct AF_GlyphHintsRec_; -typedef struct AF_GlyphHintsRec_* AF_GlyphHints; - -int _af_debug; -int _af_debug_disable_horz_hints; -int _af_debug_disable_vert_hints; -int _af_debug_disable_blue_hints; -AF_GlyphHints _af_debug_hints; + /* these variables, structures and declarations are for */ + /* communication with the debugger in the autofit module; */ + /* normal programs don't need this */ + struct AF_GlyphHintsRec_; + typedef struct AF_GlyphHintsRec_* AF_GlyphHints; + + int _af_debug_disable_horz_hints; + int _af_debug_disable_vert_hints; + int _af_debug_disable_blue_hints; + AF_GlyphHints _af_debug_hints; #ifdef __cplusplus extern "C" { #endif -extern void af_glyph_hints_dump_segments( AF_GlyphHints hints ); -extern void af_glyph_hints_dump_points( AF_GlyphHints hints ); -extern void af_glyph_hints_dump_edges( AF_GlyphHints hints ); + extern void + af_glyph_hints_dump_segments( AF_GlyphHints hints ); + extern void + af_glyph_hints_dump_points( AF_GlyphHints hints ); + extern void + af_glyph_hints_dump_edges( AF_GlyphHints hints ); + extern FT_Error + af_glyph_hints_get_num_segments( AF_GlyphHints hints, + FT_Int dimension, + FT_Int* num_segments ); + extern FT_Error + af_glyph_hints_get_segment_offset( AF_GlyphHints hints, + FT_Int dimension, + FT_Int idx, + FT_Pos* offset ); #ifdef __cplusplus } #endif @@ -88,12 +99,14 @@ grColor on_color; grColor conic_color; grColor cubic_color; + grColor segment_color; int do_horz_hints; int do_vert_hints; int do_blue_hints; int do_outline; int do_dots; + int do_segment; double gamma; const char* header; @@ -117,6 +130,7 @@ st->on_color = grFindColor( display->bitmap, 64, 64, 255, 255 ); st->conic_color = grFindColor( display->bitmap, 0, 128, 0, 255 ); st->cubic_color = grFindColor( display->bitmap, 255, 64, 255, 255 ); + st->segment_color = grFindColor( display->bitmap, 64, 255, 128, 64 ); st->disp_width = display->bitmap->width; st->disp_height = display->bitmap->rows; st->disp_bitmap = display->bitmap; @@ -126,6 +140,7 @@ st->do_blue_hints = 1; st->do_dots = 1; st->do_outline = 1; + st->do_segment = 0; st->Num = 0; st->gamma = 1.0; @@ -221,6 +236,48 @@ static void +grid_hint_draw_segment( GridStatus st, + AF_GlyphHints hints ) +{ + FT_Int dimension; + int x_org = (int)st->x_origin; + int y_org = (int)st->y_origin; + + + for ( dimension = 1; dimension >= 0; dimension-- ) + { + FT_Int num_seg; + FT_Int count; + + + af_glyph_hints_get_num_segments( hints, dimension, &num_seg ); + + for ( count = 0; count < num_seg; count++ ) + { + int pos; + FT_Pos offset; + + + af_glyph_hints_get_segment_offset( hints, dimension, count, &offset ); + + if ( dimension == 0 ) /* AF_DIMENSION_HORZ is 0 */ + { + pos = x_org + (int)offset * st->scale; + grFillVLine( st->disp_bitmap, pos, 0, + st->disp_height, st->segment_color ); + } + else + { + pos = y_org - (int)offset * st->scale; + grFillHLine( st->disp_bitmap, 0, pos, + st->disp_width, st->segment_color ); + } + } + } +} + + +static void ft_bitmap_draw( FT_Bitmap* bitmap, int x, int y, @@ -397,6 +454,21 @@ FTDemo_Get_Size( handle, &size ); + /* Draw segment before drawing glyph. */ + if ( status.do_segment ) + { + /* Force hinting first in order to collect segment info. */ + _af_debug_disable_horz_hints = 0; + _af_debug_disable_vert_hints = 0; + + if ( !FT_Load_Glyph( size->face, st->Num, + FT_LOAD_DEFAULT | + FT_LOAD_NO_BITMAP | + FT_LOAD_FORCE_AUTOHINT | + FT_LOAD_TARGET_NORMAL ) ) + grid_hint_draw_segment( &status, _af_debug_hints ); + } + _af_debug_disable_horz_hints = !st->do_horz_hints; _af_debug_disable_vert_hints = !st->do_vert_hints; @@ -501,6 +573,8 @@ grWriteln( " F1 or ? : display this help screen" ); grLn(); grWriteln( " a : toggle anti-aliasing" ); + grWriteln( " f : toggle forced autofit mode" ); + grWriteln( " h : toggle ignore hinting mode" ); grWriteln( " left/right : decrement/increment glyph index" ); grWriteln( " up/down : change character size" ); grLn(); @@ -518,9 +592,12 @@ grWriteln( " Page up/dn : zoom in/out grid" ); grWriteln( " RETURN : reset zoom and position" ); grLn(); +#ifdef FT_DEBUG_AUTOFIT grWriteln( " H : toggle horizontal hinting" ); grWriteln( " V : toggle vertical hinting" ); grWriteln( " B : toggle blue zone hinting" ); + grWriteln( " s : toggle segment drawing" ); +#endif grWriteln( " d : toggle dots display" ); grWriteln( " o : toggle outline display" ); grWriteln( " g : increase gamma by 0.1" ); @@ -530,10 +607,12 @@ grWriteln( " p : previous font" ); grWriteln( " q / ESC : exit program" ); grLn(); +#ifdef FT_DEBUG_AUTOFIT grWriteln( " 1 : dump edge hints" ); grWriteln( " 2 : dump segment hints" ); grWriteln( " 3 : dump point hints" ); grLn(); +#endif grWriteln( "press any key to exit this help screen" ); grRefreshSurface( display->surface ); @@ -581,8 +660,8 @@ { status.scale *= zoom; - sprintf( status.header_buffer, "zoom level %.2f %%\n", - status.scale / status.scale_0 ); + sprintf( status.header_buffer, "zoom level %.0f%%", + status.scale * 100.0 / status.scale_0 ); status.header = (const char *)status.header_buffer; } @@ -668,17 +747,46 @@ FTDemo_Update_Current_Flags( handle ); break; + case grKEY( 'f' ): + handle->autohint = !handle->autohint; + status.header = handle->autohint ? "forced auto-hinting is now on" + : "forced auto-hinting is now off"; + + FTDemo_Update_Current_Flags( handle ); + break; + + +#ifdef FT_DEBUG_AUTOFIT case grKEY( '1' ): - af_glyph_hints_dump_edges( _af_debug_hints ); + if (handle->hinted && handle->autohint) + { + status.header = "dumping glyph edges to stdout"; + af_glyph_hints_dump_edges( _af_debug_hints ); + } + else + status.header = "need autofit mode for edge dumping"; break; case grKEY( '2' ): - af_glyph_hints_dump_segments( _af_debug_hints ); + if (handle->hinted && handle->autohint) + { + status.header = "dumping glyph segments to stdout"; + af_glyph_hints_dump_segments( _af_debug_hints ); + } + else + status.header = "need autofit mode for segment dumping"; break; case grKEY( '3' ): - af_glyph_hints_dump_points( _af_debug_hints ); + if (handle->hinted && handle->autohint) + { + status.header = "dumping glyph points to stdout"; + af_glyph_hints_dump_points( _af_debug_hints ); + } + else + status.header = "need autofit mode for point dumping"; break; +#endif /* FT_DEBUG_AUTOFIT */ case grKEY( 'g' ): @@ -713,26 +821,48 @@ event_font_change( -1 ); break; - case grKEY('H'): - status.do_horz_hints = !status.do_horz_hints; - status.header = status.do_horz_hints ? "horizontal hinting enabled" - : "horizontal hinting disabled"; - break; - - case grKEY('V'): - status.do_vert_hints = !status.do_vert_hints; - status.header = status.do_vert_hints - ? "vertical hinting enabled" - : "vertical hinting disabled"; - break; - - case grKEY('B'): - status.do_blue_hints = !status.do_blue_hints; - status.header = status.do_blue_hints - ? "blue zone hinting enabled" - : "blue zone hinting disabled"; + +#ifdef FT_DEBUG_AUTOFIT + case grKEY( 'H' ): + if (handle->autohint) + { + status.do_horz_hints = !status.do_horz_hints; + status.header = status.do_horz_hints ? "horizontal hinting enabled" + : "horizontal hinting disabled"; + } + else + status.header = "need autofit mode to toggle horizontal hinting"; + break; + + case grKEY( 'V' ): + if (handle->autohint) + { + status.do_vert_hints = !status.do_vert_hints; + status.header = status.do_vert_hints ? "vertical hinting enabled" + : "vertical hinting disabled"; + } + else + status.header = "need autofit mode to toggle vertical hinting"; + break; + + case grKEY( 'B' ): + if (handle->autohint) + { + status.do_blue_hints = !status.do_blue_hints; + status.header = status.do_blue_hints ? "blue zone hinting enabled" + : "blue zone hinting disabled"; + } + else + status.header = "need autofit mode to toggle blue zone hinting"; break; + case grKEY( 's' ): + status.do_segment = !status.do_segment; + status.header = status.do_segment ? "segment drawing enabled" + : "segment drawing disabled"; + break; +#endif /* FT_DEBUG_AUTOFIT */ + case grKeyLeft: event_index_change( -1 ); break; case grKeyRight: event_index_change( +1 ); break; @@ -751,10 +881,10 @@ status.do_vert_hints = 1; break; - case grKEY('i'): event_grid_translate( 0, +1 ); break; - case grKEY('k'): event_grid_translate( 0, -1 ); break; - case grKEY('l'): event_grid_translate( +1, 0 ); break; - case grKEY('j'): event_grid_translate( -1, 0 ); break; + case grKEY( 'i' ): event_grid_translate( 0, +1 ); break; + case grKEY( 'k' ): event_grid_translate( 0, -1 ); break; + case grKEY( 'l' ): event_grid_translate( +1, 0 ); break; + case grKEY( 'j' ): event_grid_translate( -1, 0 ); break; case grKeyPageUp: event_grid_zoom( 1.25 ); break; case grKeyPageDown: event_grid_zoom( 1/1.25 ); break; @@ -946,7 +1076,7 @@ if ( handle->num_fonts == 0 ) Fatal( "could not find/open any font file" ); - printf( "ptsize =%g \n", status.ptsize/64.0 ); + printf( "ptsize =%g\n", status.ptsize / 64.0 ); FTDemo_Set_Current_Charsize( handle, status.ptsize, status.res ); FTDemo_Update_Current_Flags( handle ); @@ -954,8 +1084,6 @@ grid_status_rescale_initial( &status, handle ); - _af_debug = 1; - for ( ;; ) { FTDemo_Display_Clear( display ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftmulti.c new/ft2demos-2.4.5/src/ftmulti.c --- old/ft2demos-2.4.4/src/ftmulti.c 2010-07-23 13:03:33.000000000 +0200 +++ new/ft2demos-2.4.5/src/ftmulti.c 2011-06-01 10:45:00.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 1996-2000, 2003, 2004, 2005, 2010 by */ +/* Copyright 1996-2000, 2003-2005, 2010-2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -245,7 +245,7 @@ int flags; - flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; + flags = FT_LOAD_DEFAULT; if ( !hint ) flags |= FT_LOAD_NO_HINTING; @@ -261,14 +261,13 @@ Render_All( int first_glyph, int pt_size ) { - FT_F26Dot6 start_x, start_y, step_x, step_y, x, y; + FT_F26Dot6 start_x, start_y, step_y, x, y; int i; start_x = 4; start_y = 36 + pt_size; - step_x = size->metrics.x_ppem + 4; step_y = size->metrics.y_ppem + 10; x = start_x; @@ -323,7 +322,7 @@ static FT_Error Render_Text( int first_glyph ) { - FT_F26Dot6 start_x, start_y, step_x, step_y, x, y; + FT_F26Dot6 start_x, start_y, step_y, x, y; int i; const unsigned char* p; @@ -332,7 +331,6 @@ start_x = 4; start_y = 32 + size->metrics.y_ppem; - step_x = size->metrics.x_ppem + 4; step_y = size->metrics.y_ppem + 10; x = start_x; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.4.4/src/ftview.c new/ft2demos-2.4.5/src/ftview.c --- old/ft2demos-2.4.4/src/ftview.c 2010-06-07 08:51:22.000000000 +0200 +++ new/ft2demos-2.4.5/src/ftview.c 2011-06-01 10:47:02.000000000 +0200 @@ -2,7 +2,7 @@ /* */ /* The FreeType project -- a free and portable quality TrueType renderer. */ /* */ -/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */ +/* Copyright 1996-2000, 2003-2007, 2009-2011 by */ /* D. Turner, R.Wilhelm, and W. Lemberg */ /* */ /* */ @@ -35,11 +35,10 @@ #endif #define CEIL( x ) ( ( (x) + 63 ) >> 6 ) -#define INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ) \ +#define INIT_SIZE( size, start_x, start_y, step_y, x, y ) \ do { \ start_x = 4; \ start_y = CEIL( size->metrics.height ) + 3 * HEADER_HEIGHT; \ - step_x = CEIL( size->metrics.max_advance ); \ step_y = CEIL( size->metrics.height ) + 4; \ \ x = start_x; \ @@ -96,7 +95,7 @@ } status = { RENDER_MODE_ALL, FT_ENCODING_NONE, 72, 48, -1, 1.0, 0.04, 0.22, 0, 0, 0, 0, 0, NULL, { 0 }, 0, 0, - 0, "\x10\x40\x70\x40\x10", 2 }; + 0, { 0x10, 0x40, 0x70, 0x40, 0x10 }, 2 }; static FTDemo_Display* display; @@ -124,7 +123,7 @@ Render_Stroke( int num_indices, int first_index ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int i; FT_Size size; FT_Stroker stroker = NULL; @@ -138,7 +137,7 @@ return error; } - INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ); + INIT_SIZE( size, start_x, start_y, step_y, x, y ); i = first_index; @@ -217,7 +216,7 @@ Render_Slanted( int num_indices, int first_index ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int i; FT_Size size; @@ -230,7 +229,7 @@ return error; } - INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ); + INIT_SIZE( size, start_x, start_y, step_y, x, y ); i = first_index; @@ -302,7 +301,7 @@ Render_Embolden( int num_indices, int first_index ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int i; FT_Size size; @@ -315,7 +314,7 @@ return error; } - INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ); + INIT_SIZE( size, start_x, start_y, step_y, x, y ); i = first_index; @@ -418,7 +417,7 @@ Render_All( int num_indices, int first_index ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int i; FT_Size size; @@ -431,7 +430,7 @@ return error; } - INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ); + INIT_SIZE( size, start_x, start_y, step_y, x, y ); i = first_index; @@ -468,7 +467,7 @@ Render_Text( int num_indices, int first_index ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int i; FT_Size size; @@ -485,7 +484,7 @@ return error; } - INIT_SIZE( size, start_x, start_y, step_x, step_y, x, y ); + INIT_SIZE( size, start_x, start_y, step_y, x, y ); i = first_index; @@ -539,7 +538,7 @@ static FT_Error Render_Waterfall( int first_size ) { - int start_x, start_y, step_x, step_y, x, y; + int start_x, start_y, step_y, x, y; int pt_size, max_size = 100000; FT_Size size; FT_Face face; @@ -589,7 +588,6 @@ continue; } - step_x = ( size->metrics.max_advance >> 6 ) + 4; step_y = ( size->metrics.height >> 6 ) + 1; x = start_x; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org