Hello community, here is the log from the commit of package freetype2 for openSUSE:Factory checked in at 2015-10-22 12:56:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/freetype2 (Old) and /work/SRC/openSUSE:Factory/.freetype2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "freetype2" Changes: -------- --- /work/SRC/openSUSE:Factory/freetype2/freetype2.changes 2015-09-16 10:37:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.freetype2.new/freetype2.changes 2015-10-22 12:56:15.000000000 +0200 @@ -1,0 +2,59 @@ +Sun Oct 4 22:19:32 UTC 2015 - [email protected] + +- Update to version 2.6.1 + * IMPORTANT BUG FIXES + - It turned out that for CFFs only the advance widths should be + taken from the `htmx' table, not the side bearings. This bug, + introduced in version 2.6.0, makes it necessary to upgrade if + you are using CFFs; otherwise, you get cropped glyphs with GUI + interfaces like GTK or Qt. + - Accessing Type 42 fonts returned incorrect results if the glyph + order of the embedded TrueType font differs from the glyph order + of the Type 42 charstrings table. + * IMPORTANT CHANGES + - The header file layout has been changed (again), moving all + header files except `ft2build.h' into a subdirectory tree. + Doing so reduces the possibility of header file name clashes + (e.g., FTGL's `FTGlyph.h' with FreeType's `ftglyph.h') on case + insensitive file systems like Mac OS X or Windows. + Applications that use (a) the `freetype-config' script or + FreeType's `freetype2.pc' file for pkg-config to get the include + directory for the compiler, and (b) the documented way for + header inclusion like + #include <ft2build.h> + #include FT_FREETYPE_H + ... + don't need any change to the source code. + - Simple access to named instances in GX variation fonts is now + available (in addition to the previous method via FreeType's MM + interface). In the `FT_Face' structure, bits 16-30 of the + `face_index' field hold the current named instance index for the + given face index, and bits 16-30 of `style_flags' contain the + number of instances for the given face index. `FT_Open_Face' + and friends also understand the extended bits of the face index + parameter. + You need to enable TT_CONFIG_OPTION_GX_VAR_SUPPORT for this new + feature. Otherwise, bits 16-30 of the two fields are zero (or + are ignored). + - Lao script support has been added to the auto-hinter. + * MISCELLANEOUS + - The auto-hinter's Arabic script support has been enhanced. + - Superscript-like and subscript-like glyphs as used by various + phonetic alphabets like the IPA are now better supported by the + auto-hinter. + - The TrueType bytecode interpreter now runs slightly faster. + - Improved support for builds with cmake. + - The function `FT_CeilFix' now always rounds towards plus + infinity. + - The function `FT_FloorFix' now always rounds towards minus + infinity. + - A new load flag `FT_LOAD_COMPUTE_METRICS' has been added; it + makes FreeType ignore pre-computed metrics, as needed by font + validating or font editing programs. Right now, only the + TrueType module supports it to ignore data from the `hdmx' + table. + - Another round of bug fixes to better handle broken fonts, found + by Kostya Serebryany <[email protected]>. +- Dropping upstreamed patch Dont-use-hmtx-table-for-LSB.patch. + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/freetype2/ft2demos.changes 2015-06-12 21:15:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.freetype2.new/ft2demos.changes 2015-10-22 12:56:15.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Oct 4 22:24:26 UTC 2015 - [email protected] + +- Update to version 2.6.1. + +------------------------------------------------------------------- Old: ---- Dont-use-hmtx-table-for-LSB.patch freetype-2.6.tar.bz2 freetype-doc-2.6.tar.bz2 ft2demos-2.6.tar.bz2 New: ---- freetype-2.6.1.tar.bz2 freetype-doc-2.6.1.tar.bz2 ft2demos-2.6.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ freetype2.spec ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:16.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:16.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package freetype2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,9 @@ # -%define doc_version 2.6 +%define doc_version 2.6.1 Name: freetype2 -Version: 2.6 +Version: 2.6.1 Release: 0 Summary: A TrueType Font Library License: SUSE-Freetype or GPL-2.0+ @@ -29,7 +29,6 @@ Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{doc_version}.tar.bz2 Source3: baselibs.conf Patch1: freetype2-bitmap-foundry.patch -Patch2: Dont-use-hmtx-table-for-LSB.patch Patch200: freetype2-subpixel.patch # PATCH-FIX-OPENSUSE don-t-mark-libpng-as-required-library.patch -- it is private in .pc Patch202: don-t-mark-libpng-as-required-library.patch @@ -85,7 +84,6 @@ %define enable_subpixel_rendering 0 %setup -q -n freetype-%{version} -a 1 %patch1 -p1 -%patch2 -p1 %patch308961 -p 1 %patch202 -p1 %if %{enable_subpixel_rendering} ++++++ ft2demos.spec ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:16.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:16.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ft2demos # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,9 @@ # -%define freetype_version 2.6 +%define freetype_version 2.6.1 Name: ft2demos -Version: 2.6 +Version: 2.6.1 Release: 0 Summary: Freetype2 Utilities and Demo Programs License: GPL-2.0+ ++++++ bugzilla-308961-cmex-workaround.patch ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:16.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:16.000000000 +0200 @@ -2,11 +2,11 @@ src/base/ftobjs.c | 5 +++++ 1 file changed, 5 insertions(+) -Index: freetype-2.5.4/src/base/ftobjs.c +Index: freetype-2.6.1/src/base/ftobjs.c =================================================================== ---- freetype-2.5.4.orig/src/base/ftobjs.c -+++ freetype-2.5.4/src/base/ftobjs.c -@@ -2254,6 +2254,11 @@ +--- freetype-2.6.1.orig/src/base/ftobjs.c ++++ freetype-2.6.1/src/base/ftobjs.c +@@ -2267,6 +2267,11 @@ if ( FT_IS_SCALABLE( face ) ) { ++++++ don-t-mark-libpng-as-required-library.patch ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:16.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:16.000000000 +0200 @@ -1,16 +1,8 @@ -From cef195062aa7f509a60b8765661ba4babd85b79c Mon Sep 17 00:00:00 2001 -From: Hrvoje Senjan <[email protected]> -Date: Sun, 9 Mar 2014 20:09:12 +0100 -Subject: [PATCH 1/1] Don't mark libpng as required library - -It is private in .pc anyway ---- - -diff --git a/builds/unix/configure b/builds/unix/configure -index 4ae00dd..c3101e2 100755 ---- a/builds/unix/configure -+++ b/builds/unix/configure -@@ -13691,7 +13691,6 @@ esac +Index: freetype-2.6.1/builds/unix/configure +=================================================================== +--- freetype-2.6.1.orig/builds/unix/configure ++++ freetype-2.6.1/builds/unix/configure +@@ -14096,7 +14096,6 @@ esac # entries in Requires.private are separated by commas; REQUIRES_PRIVATE="$zlib_reqpriv, \ $bzip2_reqpriv, \ @@ -18,27 +10,27 @@ $harfbuzz_reqpriv" # beautify REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \ -@@ -13705,7 +13704,6 @@ REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVAT +@@ -14110,7 +14109,6 @@ REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVAT - LIBS_PRIVATE="$zlib_libpriv \ - $bzip2_libpriv \ -- $libpng_libpriv \ - $harfbuzz_libpriv \ + LIBS_PRIVATE="$zlib_libspriv \ + $bzip2_libspriv \ +- $libpng_libspriv \ + $harfbuzz_libspriv \ $ft2_extra_libs" # beautify -@@ -13717,7 +13715,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ - LIBSSTATIC_CONFIG="-lfreetype \ - $zlib_libstaticconf \ - $bzip2_libstaticconf \ -- $libpng_libstaticconf \ - $harfbuzz_libstaticconf \ +@@ -14122,7 +14120,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ + LIBSSTATIC_CONFIG="-lfreetype \ + $zlib_libsstaticconf \ + $bzip2_libsstaticconf \ +- $libpng_libsstaticconf \ + $harfbuzz_libsstaticconf \ $ft2_extra_libs" # remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later -diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw -index dd7e576..bac2645 100644 ---- a/builds/unix/configure.raw -+++ b/builds/unix/configure.raw -@@ -914,7 +914,6 @@ esac +Index: freetype-2.6.1/builds/unix/configure.raw +=================================================================== +--- freetype-2.6.1.orig/builds/unix/configure.raw ++++ freetype-2.6.1/builds/unix/configure.raw +@@ -918,7 +918,6 @@ esac # entries in Requires.private are separated by commas; REQUIRES_PRIVATE="$zlib_reqpriv, \ $bzip2_reqpriv, \ @@ -46,19 +38,19 @@ $harfbuzz_reqpriv" # beautify REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \ -@@ -928,7 +927,6 @@ REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVAT +@@ -932,7 +931,6 @@ REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVAT - LIBS_PRIVATE="$zlib_libpriv \ - $bzip2_libpriv \ -- $libpng_libpriv \ - $harfbuzz_libpriv \ + LIBS_PRIVATE="$zlib_libspriv \ + $bzip2_libspriv \ +- $libpng_libspriv \ + $harfbuzz_libspriv \ $ft2_extra_libs" # beautify -@@ -940,7 +938,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ - LIBSSTATIC_CONFIG="-lfreetype \ - $zlib_libstaticconf \ - $bzip2_libstaticconf \ -- $libpng_libstaticconf \ - $harfbuzz_libstaticconf \ +@@ -944,7 +942,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ + LIBSSTATIC_CONFIG="-lfreetype \ + $zlib_libsstaticconf \ + $bzip2_libsstaticconf \ +- $libpng_libsstaticconf \ + $harfbuzz_libsstaticconf \ $ft2_extra_libs" # remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later ++++++ freetype-2.6.tar.bz2 -> freetype-2.6.1.tar.bz2 ++++++ ++++ 86293 lines of diff (skipped) ++++++ freetype-doc-2.6.tar.bz2 -> freetype-doc-2.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetype-2.6/README.freetype-doc new/freetype-2.6.1/README.freetype-doc --- old/freetype-2.6/README.freetype-doc 2015-06-07 10:05:16.000000000 +0200 +++ new/freetype-2.6.1/README.freetype-doc 2015-10-04 11:53:43.000000000 +0200 @@ -7,10 +7,10 @@ mkdir src cd src - tar xzvf freetype-2.6.tar.gz - tar xzvf freetype-doc-2.6.tar.gz + tar xzvf freetype-2.6.1.tar.gz + tar xzvf freetype-doc-2.6.1.tar.gz -Now you can move the `docs' subdirectory of `freetype-2.6' to any place +Now you can move the `docs' subdirectory of `freetype-2.6.1' to any place you want. The entry point for the documentation is ++++++ freetype2-bitmap-foundry.patch ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:18.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:18.000000000 +0200 @@ -2,11 +2,11 @@ src/pcf/pcfread.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) -Index: freetype-2.5.4/src/pcf/pcfread.c +Index: freetype-2.6.1/src/pcf/pcfread.c =================================================================== ---- freetype-2.5.4.orig/src/pcf/pcfread.c -+++ freetype-2.5.4/src/pcf/pcfread.c -@@ -1210,8 +1210,34 @@ THE SOFTWARE. +--- freetype-2.6.1.orig/src/pcf/pcfread.c ++++ freetype-2.6.1/src/pcf/pcfread.c +@@ -1246,8 +1246,34 @@ THE SOFTWARE. prop = pcf_find_property( face, "FAMILY_NAME" ); if ( prop && prop->isString ) { ++++++ freetype2-subpixel.patch ++++++ --- /var/tmp/diff_new_pack.dPGVvv/_old 2015-10-22 12:56:18.000000000 +0200 +++ /var/tmp/diff_new_pack.dPGVvv/_new 2015-10-22 12:56:18.000000000 +0200 @@ -1,7 +1,7 @@ -Index: freetype-2.5.4/include/config/ftoption.h +Index: freetype-2.6.1/include/freetype/config/ftoption.h =================================================================== ---- freetype-2.5.4.orig/include/config/ftoption.h -+++ freetype-2.5.4/include/config/ftoption.h +--- freetype-2.6.1.orig/include/freetype/config/ftoption.h ++++ freetype-2.6.1/include/freetype/config/ftoption.h @@ -92,7 +92,7 @@ FT_BEGIN_HEADER /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ @@ -11,7 +11,7 @@ /*************************************************************************/ -@@ -604,7 +604,7 @@ FT_BEGIN_HEADER +@@ -602,7 +602,7 @@ FT_BEGIN_HEADER /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ /* */ ++++++ ft2demos-2.6.tar.bz2 -> ft2demos-2.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/ChangeLog new/ft2demos-2.6.1/ChangeLog --- old/ft2demos-2.6/ChangeLog 2015-06-07 09:35:41.000000000 +0200 +++ new/ft2demos-2.6.1/ChangeLog 2015-10-04 11:50:31.000000000 +0200 @@ -1,3 +1,49 @@ +2015-10-04 Werner Lemberg <[email protected]> + + * Version 2.6.1 released. + ========================= + + + Tag sources with `VER-2-6-1'. + + * README: Updated. + * src/*.1: Updated. + +2015-09-13 Werner Lemberg <[email protected]> + + * Makefile (FT_H): Updated to recent directory changes (#45954). + + The patch is taken from the anonymous Savannah bug report. + +2015-08-13 Werner Lemberg <[email protected]> + + [ftcommon] Support named instances of GX variation fonts. + + * src/ftcommon.c (FTDemo_Install_Font): Add inner loop for named + instances. + +2015-08-05 Werner Lemberg <[email protected]> + + [ftgrid] Avoid invalid left-shift of negative values. + + * src/ftgrid.c (grid_status_draw_outline): Don't use left-shift but + multiplication. + +2015-08-04 Werner Lemberg <[email protected]> + + * src/ftmulti.c (main): Fix double-free in case of invalid font. + +2015-07-08 Werner Lemberg <[email protected]> + + [ftcommon] Improve loading of font collections. + + * src/ftcommon.c (FTDemo_Install_Font): Don't exit if first face of + a font is invalid. + Don't exit if we want outline fonts only and the first face isn't. + Don't exit if there are problems with the cmap. + + In all three cases, simply skip the font face. + 2015-06-07 Werner Lemberg <[email protected]> * Version 2.6 released. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/Makefile new/ft2demos-2.6.1/Makefile --- old/ft2demos-2.6/Makefile 2015-06-07 09:34:19.000000000 +0200 +++ new/ft2demos-2.6.1/Makefile 2015-09-25 07:59:28.000000000 +0200 @@ -540,7 +540,7 @@ # we check for `dist', not `distclean' ifneq ($(findstring distx,$(MAKECMDGOALS)x),) - FT_H := ../freetype2/include/freetype.h + FT_H := ../freetype2/include/freetype/freetype.h major := $(shell sed -n 's/.*FREETYPE_MAJOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H)) minor := $(shell sed -n 's/.*FREETYPE_MINOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/README new/ft2demos-2.6.1/README --- old/ft2demos-2.6/README 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/README 2015-10-04 11:49:53.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.6 freetype2 on Unix - rename freetype-2.6 freetype2 on Windows + mv freetype-2.6.1 freetype2 on Unix + rename freetype-2.6.1 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.6/src/ftbench.1 new/ft2demos-2.6.1/src/ftbench.1 --- old/ft2demos-2.6/src/ftbench.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftbench.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,5 +1,5 @@ '\" t -.TH FTVIEW 1 "June 2015" "Freetype 2.6" +.TH FTVIEW 1 "October 2015" "Freetype 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftcommon.c new/ft2demos-2.6.1/src/ftcommon.c --- old/ft2demos-2.6/src/ftcommon.c 2015-04-14 07:24:52.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftcommon.c 2015-09-25 07:59:28.000000000 +0200 @@ -367,129 +367,151 @@ strncpy( filename, filepath, len ); filename[len] = 0; - error = FT_New_Face( handle->library, filename, 0, &face ); + /* We use a conservative approach here, at the cost of calling */ + /* `FT_New_Face' quite often. The idea is that our demo programs */ + /* should be able to try all faces and named instances of a font, */ + /* expecting that some faces don't work for various reasons, e.g., */ + /* a broken subfont, or an unsupported NFNT bitmap font in a Mac */ + /* dfont resource that holds more than a single font. */ + + error = FT_New_Face( handle->library, filename, -1, &face ); if ( error ) return error; - - if ( outline_only && !FT_IS_SCALABLE( face ) ) - return FT_Err_Invalid_Argument; - - /* allocate new font object */ num_faces = face->num_faces; + FT_Done_Face( face ); + + /* allocate new font object(s) */ for ( i = 0; i < num_faces; i++ ) { PFont font; + long j, instance_count; + + error = FT_New_Face( handle->library, filename, -( i + 1 ), &face ); + if ( error ) + continue; + instance_count = face->style_flags >> 16; + FT_Done_Face( face ); - if ( i > 0 ) + /* load face with and without named instances */ + for ( j = 0; j < instance_count + 1; j++ ) { - error = FT_New_Face( handle->library, filename, i, &face ); + error = FT_New_Face( handle->library, + filename, + ( j << 16 ) + i, + &face ); if ( error ) continue; - } - if ( handle->encoding != FT_ENCODING_NONE ) - { - error = FT_Select_Charmap( face, handle->encoding ); - if ( error ) + if ( outline_only && !FT_IS_SCALABLE( face ) ) { FT_Done_Face( face ); - return error; + continue; } - } - - font = (PFont)malloc( sizeof ( *font ) ); - /* We allocate four more bytes since we want to attach an AFM */ - /* or PFM file for Type 1 fonts (if available). Such fonts */ - /* always have the extension `.afm' or `.pfm'. */ - font->filepathname = (char*)malloc( strlen( filename ) + 4 + 1 ); - strcpy( (char*)font->filepathname, filename ); - - font->face_index = i; - font->cmap_index = face->charmap ? FT_Get_Charmap_Index( face->charmap ) - : 0; + if ( handle->encoding != FT_ENCODING_NONE ) + { + error = FT_Select_Charmap( face, handle->encoding ); + if ( error ) + { + FT_Done_Face( face ); + continue; + } + } - if ( handle->preload ) - { - FILE* file = fopen( filename, "rb" ); - int file_size; + font = (PFont)malloc( sizeof ( *font ) ); + /* We allocate four more bytes since we want to attach an AFM */ + /* or PFM file for Type 1 fonts (if available). Such fonts */ + /* always have the extension `.afm' or `.pfm'. */ + font->filepathname = (char*)malloc( strlen( filename ) + 4 + 1 ); + strcpy( (char*)font->filepathname, filename ); + + font->face_index = ( j << 16 ) + i; + font->cmap_index = face->charmap ? FT_Get_Charmap_Index( face->charmap ) + : 0; - if ( file == NULL ) /* shouldn't happen */ + if ( handle->preload ) { - free( font ); - return FT_Err_Invalid_Argument; - } + FILE* file = fopen( filename, "rb" ); + int file_size; - fseek( file, 0, SEEK_END ); - file_size = ftell( file ); - fseek( file, 0, SEEK_SET ); - if ( file_size <= 0 ) - return FT_Err_Invalid_Stream_Operation; + if ( file == NULL ) /* shouldn't happen */ + { + free( font ); + return FT_Err_Invalid_Argument; + } - font->file_address = malloc( (size_t)file_size ); - fread( font->file_address, 1, (size_t)file_size, file ); + fseek( file, 0, SEEK_END ); + file_size = ftell( file ); + fseek( file, 0, SEEK_SET ); - font->file_size = (size_t)file_size; + if ( file_size <= 0 ) + return FT_Err_Invalid_Stream_Operation; - fclose( file ); - } - else - { - font->file_address = NULL; - font->file_size = 0; - } + font->file_address = malloc( (size_t)file_size ); + fread( font->file_address, 1, (size_t)file_size, file ); - switch ( handle->encoding ) - { - case FT_ENCODING_NONE: - font->num_indices = face->num_glyphs; - break; - - case FT_ENCODING_UNICODE: - font->num_indices = 0x110000L; - break; - - case FT_ENCODING_ADOBE_LATIN_1: - case FT_ENCODING_ADOBE_STANDARD: - case FT_ENCODING_ADOBE_EXPERT: - case FT_ENCODING_ADOBE_CUSTOM: - case FT_ENCODING_APPLE_ROMAN: - font->num_indices = 0x100L; - break; - - /* some fonts use range 0x00-0x100, others have 0xF000-0xF0FF */ - case FT_ENCODING_MS_SYMBOL: - font->num_indices = 0x10000L; + font->file_size = (size_t)file_size; - default: - font->num_indices = 0x10000L; - } + fclose( file ); + } + else + { + font->file_address = NULL; + font->file_size = 0; + } - FT_Done_Face( face ); - face = NULL; + switch ( handle->encoding ) + { + case FT_ENCODING_NONE: + font->num_indices = face->num_glyphs; + break; + + case FT_ENCODING_UNICODE: + font->num_indices = 0x110000L; + break; + + case FT_ENCODING_ADOBE_LATIN_1: + case FT_ENCODING_ADOBE_STANDARD: + case FT_ENCODING_ADOBE_EXPERT: + case FT_ENCODING_ADOBE_CUSTOM: + case FT_ENCODING_APPLE_ROMAN: + font->num_indices = 0x100L; + break; + + /* some fonts use range 0x00-0x100, others have 0xF000-0xF0FF */ + case FT_ENCODING_MS_SYMBOL: + font->num_indices = 0x10000L; - if ( handle->max_fonts == 0 ) - { - handle->max_fonts = 16; - handle->fonts = (PFont*)calloc( (size_t)handle->max_fonts, - sizeof ( PFont ) ); - } - else if ( handle->num_fonts >= handle->max_fonts ) - { - handle->max_fonts *= 2; - handle->fonts = (PFont*)realloc( handle->fonts, - (size_t)handle->max_fonts * - sizeof ( PFont ) ); - - memset( &handle->fonts[handle->num_fonts], 0, - (size_t)( handle->max_fonts - handle->num_fonts ) * - sizeof ( PFont ) ); - } + default: + font->num_indices = 0x10000L; + } + + FT_Done_Face( face ); + face = NULL; - handle->fonts[handle->num_fonts++] = font; + if ( handle->max_fonts == 0 ) + { + handle->max_fonts = 16; + handle->fonts = (PFont*)calloc( (size_t)handle->max_fonts, + sizeof ( PFont ) ); + } + else if ( handle->num_fonts >= handle->max_fonts ) + { + handle->max_fonts *= 2; + handle->fonts = (PFont*)realloc( handle->fonts, + (size_t)handle->max_fonts * + sizeof ( PFont ) ); + + memset( &handle->fonts[handle->num_fonts], 0, + (size_t)( handle->max_fonts - handle->num_fonts ) * + sizeof ( PFont ) ); + } + + handle->fonts[handle->num_fonts++] = font; + } } return FT_Err_Ok; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftdiff.1 new/ft2demos-2.6.1/src/ftdiff.1 --- old/ft2demos-2.6/src/ftdiff.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftdiff.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTDIFF 1 "June 2015" "FreeType 2.6" +.TH FTDIFF 1 "October 2015" "FreeType 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftdump.1 new/ft2demos-2.6.1/src/ftdump.1 --- old/ft2demos-2.6/src/ftdump.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftdump.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTDUMP 1 "June 2015" "FreeType 2.6" +.TH FTDUMP 1 "October 2015" "FreeType 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftgamma.1 new/ft2demos-2.6.1/src/ftgamma.1 --- old/ft2demos-2.6/src/ftgamma.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftgamma.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTGAMMA 1 "June 2015" "FreeType 2.6" +.TH FTGAMMA 1 "October 2015" "FreeType 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftgrid.1 new/ft2demos-2.6.1/src/ftgrid.1 --- old/ft2demos-2.6/src/ftgrid.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftgrid.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTGRID 1 "June 2015" "Freetype 2.6" +.TH FTGRID 1 "October 2015" "Freetype 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftgrid.c new/ft2demos-2.6.1/src/ftgrid.c --- old/ft2demos-2.6/src/ftgrid.c 2015-06-06 09:32:10.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftgrid.c 2015-09-25 07:59:28.000000000 +0200 @@ -673,11 +673,11 @@ /* get vectors to previous and next point and normalize them; */ /* we use 16.16 format to improve the computation precision */ - in.x = ( points[prev].x - points[nn].x ) << 10; - in.y = ( points[prev].y - points[nn].y ) << 10; + in.x = ( points[prev].x - points[nn].x ) * 1024; + in.y = ( points[prev].y - points[nn].y ) * 1024; - out.x = ( points[next].x - points[nn].x ) << 10; - out.y = ( points[next].y - points[nn].y ) << 10; + out.x = ( points[next].x - points[nn].x ) * 1024; + out.y = ( points[next].y - points[nn].y ) * 1024; in_len = FT_Vector_Length( &in ); out_len = FT_Vector_Length( &out ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftlint.1 new/ft2demos-2.6.1/src/ftlint.1 --- old/ft2demos-2.6/src/ftlint.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftlint.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTLINT 1 "June 2015" "Freetype 2.6" +.TH FTLINT 1 "October 2015" "Freetype 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftmulti.1 new/ft2demos-2.6.1/src/ftmulti.1 --- old/ft2demos-2.6/src/ftmulti.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftmulti.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTMULTI 1 "June 2015" "Freetype 2.6" +.TH FTMULTI 1 "October 2015" "Freetype 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftmulti.c new/ft2demos-2.6.1/src/ftmulti.c --- old/ft2demos-2.6/src/ftmulti.c 2015-04-02 10:52:55.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftmulti.c 2015-09-25 07:59:28.000000000 +0200 @@ -792,7 +792,10 @@ /* Load face */ error = FT_New_Face( library, argv[file], 0, &face ); if ( error ) + { + face = NULL; goto Display_Font; + } if ( encoding != FT_ENCODING_NONE ) { @@ -804,7 +807,10 @@ /* retrieve multiple master information */ error = FT_Get_MM_Var( face, &multimaster ); if ( error ) + { + multimaster = NULL; goto Display_Font; + } /* if the user specified a position, use it, otherwise */ /* set the current position to the median of each axis */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftstring.1 new/ft2demos-2.6.1/src/ftstring.1 --- old/ft2demos-2.6/src/ftstring.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftstring.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTSTRING 1 "June 2015" "Freetype 2.6" +.TH FTSTRING 1 "October 2015" "Freetype 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftvalid.1 new/ft2demos-2.6.1/src/ftvalid.1 --- old/ft2demos-2.6/src/ftvalid.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftvalid.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTVALID 1 "June 2015" "FreeType 2.6" +.TH FTVALID 1 "October 2015" "FreeType 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ftview.1 new/ft2demos-2.6.1/src/ftview.1 --- old/ft2demos-2.6/src/ftview.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ftview.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH FTVIEW 1 "June 2015" "FreeType 2.6" +.TH FTVIEW 1 "October 2015" "FreeType 2.6.1" . . .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2demos-2.6/src/ttdebug.1 new/ft2demos-2.6.1/src/ttdebug.1 --- old/ft2demos-2.6/src/ttdebug.1 2015-06-07 06:24:47.000000000 +0200 +++ new/ft2demos-2.6.1/src/ttdebug.1 2015-10-04 11:49:53.000000000 +0200 @@ -1,4 +1,4 @@ -.TH TTDEBUG 1 "June 2015" "FreeType 2.6" +.TH TTDEBUG 1 "October 2015" "FreeType 2.6.1" . . .SH NAME
