Hello community,

here is the log from the commit of package freetype2 for openSUSE:Factory 
checked in at 2013-07-04 10:09:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2013-06-18 
15:11:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.freetype2.new/freetype2.changes 2013-07-04 
10:09:27.000000000 +0200
@@ -1,0 +2,19 @@
+Wed Jul  3 08:31:13 UTC 2013 - [email protected]
+
+- Update to version 2.5.0.1
+  * The cache manager function `FTC_Manager_Reset'  didn't flush the
+    cache.
+  * Behdad Esfahbod  (on behalf  of Google) contributed  support for
+    color embedded bitmaps (eg. color emoji).
+  * The  old FreeType  CFF engine  is now  disabled by  default.
+  * All code related to macro FT_CONFIG_OPTION_OLD_INTERNALS
+    has been removed.
+  * The  property API  (`FT_Property_Get' and  `FT_Property_Set') is
+    now declared as stable.
+  * Another round of TrueType subpixel hinting fixes.
+  * 64bit compilation of the new CFF engine was buggy.
+  * Some fixes to improve robustness in memory-tight situations.
+- Add dependency on libpng-devel for color emoji support.
+- Drop freetype-new-cff-engine.patch, upstream now.
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/freetype2/ft2demos.changes       2013-06-18 
15:11:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.freetype2.new/ft2demos.changes  2013-07-04 
10:09:27.000000000 +0200
@@ -1,0 +2,9 @@
+Wed Jul  3 08:33:20 UTC 2013 - [email protected]
+
+- Update to version 2.5.0
+  * ftview has been updated to  support color embedded bitmaps.
+  * The 'ttdebug' program has been further improved.  In particular,
+    it accepts a new command line  option `-H' to select the hinting
+    engine.
+
+-------------------------------------------------------------------

Old:
----
  freetype-2.4.12.tar.bz2
  freetype-doc-2.4.12.tar.bz2
  freetype-new-cff-engine.patch
  ft2demos-2.4.12.tar.bz2

New:
----
  freetype-2.5.0.1.tar.bz2
  freetype-doc-2.5.0.tar.bz2
  ft2demos-2.5.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ freetype2.spec ++++++
--- /var/tmp/diff_new_pack.ojW1hT/_old  2013-07-04 10:09:29.000000000 +0200
+++ /var/tmp/diff_new_pack.ojW1hT/_new  2013-07-04 10:09:29.000000000 +0200
@@ -18,6 +18,7 @@
 
 Name:           freetype2
 BuildRequires:  gawk
+BuildRequires:  libpng-devel
 BuildRequires:  pkg-config
 BuildRequires:  zlib-devel
 # bug437293
@@ -25,17 +26,17 @@
 Obsoletes:      freetype2-64bit
 %endif
 #
-Version:        2.4.12
+%define doc_version 2.5.0
+Version:        2.5.0.1
 Release:        0
 Summary:        A TrueType Font Library
 License:        SUSE-Freetype or GPL-2.0+
 Group:          System/Libraries
 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
+Source1:        
http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{doc_version}.tar.bz2
 Source3:        baselibs.conf
-Patch1:         freetype-new-cff-engine.patch
-Patch3:         freetype2-bitmap-foundry.patch
+Patch1:         freetype2-bitmap-foundry.patch
 Patch308961:    bugzilla-308961-cmex-workaround.patch
 Patch200:       freetype2-subpixel.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -47,8 +48,8 @@
 %package -n libfreetype6
 Summary:        A TrueType Font Library
 Group:          System/Libraries
-Obsoletes:      freetype2 < 2.3.10
-Provides:       freetype2 = 2.3.10
+Obsoletes:      freetype2 < %{version}
+Provides:       freetype2 = %{version}
 
 %description -n libfreetype6
 This library features TrueType fonts for open source projects. This
@@ -79,7 +80,6 @@
 %define enable_subpixel_rendering 0
 %setup -q -n freetype-%{version} -a 1
 %patch1 -p1
-%patch3 -p1
 %patch308961 -p 1
 %if %{enable_subpixel_rendering}
 %patch200 -p1
@@ -94,9 +94,6 @@
 %install
 %makeinstall
 
-# these development documents should go into the freetype2-devel package:
-mv docs/reference freetype-%{version}/docs
-
 # remove documentation that does not belong in an rpm
 rm docs/INSTALL*
 
@@ -108,11 +105,11 @@
 %defattr(-,root,root)
 %{_libdir}/libfreetype.so.*
 %doc ChangeLog README
-%doc docs/*
+%doc docs/{CHANGES,CUSTOMIZE,DEBUG,MAKEPP,PROBLEMS,TODO,*.txt}
 
 %files devel
 %defattr(-,root,root)
-%doc freetype-%{version}/docs/*
+%doc docs/reference/*
 %{_includedir}/*
 %if 0%{?suse_version} >= 1140
 %exclude %{_libdir}/libfreetype.*a

++++++ ft2demos.spec ++++++
--- /var/tmp/diff_new_pack.ojW1hT/_old  2013-07-04 10:09:29.000000000 +0200
+++ /var/tmp/diff_new_pack.ojW1hT/_new  2013-07-04 10:09:29.000000000 +0200
@@ -17,17 +17,18 @@
 
 
 Name:           ft2demos
-Version:        2.4.12
+Version:        2.5.0
 Release:        0
 Summary:        Freetype2 Utilities and Demo Programs
 License:        GPL-2.0+
 Group:          Productivity/Publishing/Other
-%define freetype_version %{version}
+%define freetype_version 2.5.0.1
 Url:            http://www.freetype.org
-Source0:        
http://savannah.nongnu.org/download/freetype/freetype-%{version}.tar.bz2
+Source0:        
http://savannah.nongnu.org/download/freetype/freetype-%{freetype_version}.tar.bz2
 Source1:        
http://savannah.nongnu.org/download/freetype/ft2demos-%{version}.tar.bz2
 Patch308961:    bugzilla-308961-cmex-workaround.patch
 Patch200:       freetype2-subpixel.patch
+BuildRequires:  libpng-devel
 BuildRequires:  xorg-x11-devel
 Conflicts:      dtc    
 Supplements:    fonts-config

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.ojW1hT/_old  2013-07-04 10:09:29.000000000 +0200
+++ /var/tmp/diff_new_pack.ojW1hT/_new  2013-07-04 10:09:29.000000000 +0200
@@ -5,4 +5,4 @@
        requires -freetype2-<targettype>
        requires "libfreetype6-<targettype>"
        requires "zlib-devel-<targettype>"
-       
+






++++++ freetype-2.4.12.tar.bz2 -> freetype-2.5.0.1.tar.bz2 ++++++
++++ 17782 lines of diff (skipped)

++++++ freetype-doc-2.4.12.tar.bz2 -> freetype-doc-2.5.0.tar.bz2 ++++++

++++++ ft2demos-2.4.12.tar.bz2 -> ft2demos-2.5.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/ChangeLog 
new/ft2demos-2.5.0/ChangeLog
--- old/ft2demos-2.4.12/ChangeLog       2013-05-08 11:56:27.000000000 +0200
+++ new/ft2demos-2.5.0/ChangeLog        2013-06-19 10:43:03.000000000 +0200
@@ -1,3 +1,139 @@
+2013-0-19  Werner Lemberg  <[email protected]>
+
+       * Version 2.5.0 released.
+       =========================
+
+
+       Tag sources with `VER-2-5-0'.
+
+       * README: Updated.
+
+2013-06-12  Werner Lemberg  <[email protected]>
+
+       [ftbench] Allow arbitrary sizes.
+
+       * src/ftbench.c (main): Remove size limit.
+
+2013-06-10  Werner Lemberg  <[email protected]>
+
+       [ftview] Use key `K' for toggling small cache.
+
+       Key `C' is already in use.
+
+       * src/ftview.c (Process_Event) <'C'>: Replace with...
+       <'K'>: This key.
+       Add missing `break'.
+       (event_help): Updated.
+
+2013-06-09  Werner Lemberg  <[email protected]>
+
+       [ttdebug] Add command `f' to select number format.
+
+       * src/ttdebug.c (use_float): New global variable.
+       (RunIns): Add `f' key to toggle between floating and fixed point
+       number formats.
+       Update all affected print commands.
+
+2013-06-09  Werner Lemberg  <[email protected]>
+
+       [ttdebug] Add command `l', improve help and output.
+
+       * src/ttdebug.c (RunIns): Display message if entering a new code
+       range.
+       Improve output of `?' and `p' keys.
+       Add `l' key to show last bytecode instruction.
+
+2013-06-09  Werner Lemberg  <[email protected]>
+
+       [ttdebug] Add command line option `-H' to select hinting engine.
+
+       * src/ttdebug.c: Include FT_TRUETYPE_DRIVER_H.
+       (default_version, alternative_version): New global variables.
+       (Usage): Updated.
+       (main): Handle option `-H'.
+
+2013-06-09  Werner Lemberg  <[email protected]>
+
+       [ftview] Fix cache handling.
+
+       * src/ftview.c (event_cff_hinting_engine_change,
+       event_tt_interpreter_version_change): Reset the cache to flush the
+       glyph image cache.  Otherwise, the cache lookup functions get
+       confused since info about module properties is not stored in the
+       glyph cache nodes.
+
+2013-06-03  Werner Lemberg  <[email protected]>
+
+       [ftview, ftdiff, ftbench] Update CFF and TT property handling.
+
+       * src/ftbench.c (main): Make option `-H' use the non-default
+       properties and warning if there is a problem.
+
+       * src/ftdiff (render_state_init): At startup, use default
+       properties.
+       (process_event) <'H'>: Do nothing if non-default `hinting-engine'
+       property is not available.
+
+       * src/ftview.c (event_cff_hinting_engine_change): Do nothing if
+       non-default `hinting-engine' property is not avaiable.
+       (Process_Event) <'H'>: Updated.
+       (main): At startup, use default properties.
+
+2013-05-22  Behdad Esfahbod  <[email protected]>
+
+       Add support for color glyphs.
+
+       In ftview, key `c' toggles color, while use of sbits cache is now
+       mapped to key `C'.
+
+       The premultiplied bgra blending is still off.
+
+       * graph/gblany.h (_gblender_blit_bgra_): New template.
+       * graph/graph.h (grPixelMode): Add gr_pixel_mode_bgra.
+       * graph/gblblit.h (GBlenderSourceFormat): Add GBLENDER_SOURCE_BGRA.
+       * graph/gblblit.c (gblender_blit_init): Handle GBLENDER_SOURCE_BGRA.
+       * graph/grblit.c (grBlitGlyphToBitmap): Updated.
+       * graph/gblbgra.h: New header file.
+
+       * src/ftcommon.h (FTDemo_Handle): New member `color'.
+       * src/ftcommon.c (FTDemo_New, FTDemo_Update_Current_Flags): Updated.
+       (FTDemo_Glyph_To_Bitmap): Handle FT_PIXEL_MODE_BGRA.
+
+       * src/ftview.c (Process_Event) <'c'>: Handle color.
+       <'C'>: Handle sbits cache.
+       (help): Updated.
+       (write_header): Updated.
+
+       * Makefile (LINK_LIBS): Add -lpng.
+
+2013-05-17  Werner Lemberg  <[email protected]>
+
+       [ftview, ftdiff, ftbench] Support `interpreter-version' property.
+
+       * src/ftbench.c: Include FT_TRUETYPE_DRIVER_H.
+       (usage): Updated.
+       (main): Update `-H' option.
+
+       * src/ftdiff.c: Include FT_TRUETYPE_DRIVER_H.
+       s/hinting_engine/cff_hinting_engine/.
+       (ColumnStateRec): Add `tt_interpreter_version' member.
+       (render_state_init, render_state_draw): Updated.
+       (event_help): Updated.
+       (process_event) <'H'>: Handle new property.
+
+       * src/ftview.c: Include FT_TRUETYPE_DRIVER_H.
+       s/hinting_engine/cff_hinting_engine/.
+       s/HINTING_ENGINES/CFF_HINTING_ENGINES/.
+       (status): Add `tt_interpreter_version' member.
+       (event_tt_interpreter_version_change): New function.
+       (Process_Event) <'H'>: Use it.
+       (write_header): Udpated.
+       (main): Set default value for `interpreter-version'.
+
+2013-05-13  Sebastien Bacher  <[email protected]>
+
+       * src/ftview.c (write_header): Fix uninitialized variables.
+
 2013-05-08  Werner Lemberg  <[email protected]>
 
        * Version 2.4.12 released.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/Makefile new/ft2demos-2.5.0/Makefile
--- old/ft2demos-2.4.12/Makefile        2013-05-01 11:37:07.000000000 +0200
+++ new/ft2demos-2.5.0/Makefile 2013-05-29 10:48:10.000000000 +0200
@@ -160,7 +160,7 @@
   else
     LINK_CMD = $(CC) $(subst /,$(COMPILER_SEP),$(LDFLAGS))
     ifeq ($(PLATFORM),unixdev)
-      LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) -lm -lbz2
+      LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) -lm -lbz2 -lpng
     else
       LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE))
     endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/README new/ft2demos-2.5.0/README
--- old/ft2demos-2.4.12/README  2013-05-08 11:58:13.000000000 +0200
+++ new/ft2demos-2.5.0/README   2013-06-19 10:43:37.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.12 freetype2       on Unix
-    rename freetype-2.4.12 freetype2   on Windows
+    mv freetype-2.5.0 freetype2       on Unix
+    rename freetype-2.5.0 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.12/graph/gblany.h 
new/ft2demos-2.5.0/graph/gblany.h
--- old/ft2demos-2.4.12/graph/gblany.h  2013-01-22 14:31:35.000000000 +0100
+++ new/ft2demos-2.5.0/graph/gblany.h   2013-05-29 10:51:54.000000000 +0200
@@ -41,8 +41,8 @@
 
 
 static void
-GCONCAT( _gblender_blit_gray8_, GDST_TYPE )( GBlenderBlit    blit,
-                                             GBlenderPixel   color )
+GCONCAT( _gblender_blit_gray8_, GDST_TYPE )( GBlenderBlit   blit,
+                                             GBlenderPixel  color )
 {
   GBlender  blender = blit->blender;
   int       r = (color >> 16) & 255;
@@ -56,8 +56,8 @@
 
 
 static void
-GCONCAT( _gblender_blit_hrgb_, GDST_TYPE )( GBlenderBlit    blit,
-                                            GBlenderPixel   color )
+GCONCAT( _gblender_blit_hrgb_, GDST_TYPE )( GBlenderBlit   blit,
+                                            GBlenderPixel  color )
 {
   GBlender  blender = blit->blender;
   int       r = (color >> 16) & 255;
@@ -71,8 +71,8 @@
 
 
 static void
-GCONCAT( _gblender_blit_hbgr_, GDST_TYPE )( GBlenderBlit    blit,
-                                            GBlenderPixel   color )
+GCONCAT( _gblender_blit_hbgr_, GDST_TYPE )( GBlenderBlit   blit,
+                                            GBlenderPixel  color )
 {
   GBlender  blender = blit->blender;
   int       r = (color >> 16) & 255;
@@ -86,8 +86,8 @@
 
 
 static void
-GCONCAT( _gblender_blit_vrgb_, GDST_TYPE )( GBlenderBlit    blit,
-                                            GBlenderPixel   color )
+GCONCAT( _gblender_blit_vrgb_, GDST_TYPE )( GBlenderBlit   blit,
+                                            GBlenderPixel  color )
 {
   GBlender  blender = blit->blender;
   int       r = (color >> 16) & 255;
@@ -99,9 +99,10 @@
 #include "gblvrgb.h"
 }
 
+
 static void
-GCONCAT( _gblender_blit_vbgr_, GDST_TYPE )( GBlenderBlit    blit,
-                                            GBlenderPixel   color )
+GCONCAT( _gblender_blit_vbgr_, GDST_TYPE )( GBlenderBlit   blit,
+                                            GBlenderPixel  color )
 {
   GBlender  blender = blit->blender;
   int       r = (color >> 16) & 255;
@@ -113,6 +114,19 @@
 #include "gblvbgr.h"
 }
 
+
+static void
+GCONCAT( _gblender_blit_bgra_, GDST_TYPE )( GBlenderBlit   blit,
+                                            GBlenderPixel  color )
+{
+  GBlender  blender = blit->blender;
+
+  color = color; /* Unused */
+
+#include "gblbgra.h"
+}
+
+
 /* unset the macros, to prevent accidental re-use
  */
 
@@ -126,4 +140,5 @@
 #undef GDST_STOREP
 #undef GDST_STOREC
 #undef GDST_COPY_VAR
+
 /* EOF */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/graph/gblbgra.h 
new/ft2demos-2.5.0/graph/gblbgra.h
--- old/ft2demos-2.4.12/graph/gblbgra.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ft2demos-2.5.0/graph/gblbgra.h  2013-05-29 11:19:26.000000000 +0200
@@ -0,0 +1,65 @@
+
+  int                   h        = blit->height;
+  const unsigned char*  src_line = blit->src_line;
+  unsigned char*        dst_line = blit->dst_line;
+
+  gblender_use_channels( blender, 0 );
+
+  do
+  {
+    const unsigned char*  src = src_line + blit->src_x*4;
+    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    int                   w   = blit->width;
+
+    do
+    {
+      int  a = GBLENDER_SHADE_INDEX(src[3]);
+      int ra = src[3];
+      int b = src[0];
+      int g = src[1];
+      int r = src[2];
+
+      if ( a == 0 )
+      {
+        /* nothing */
+      }
+      else if ( a == GBLENDER_SHADE_COUNT-1 )
+      {
+        GDST_COPY_VAR
+        GDST_COPY(dst);
+      }
+      else
+      {
+        b = b * 255 / ra;
+        g = g * 255 / ra;
+        r = r * 255 / ra;
+
+        {
+          GBLENDER_VARS(blender,color);
+
+          GBlenderPixel  back;
+
+          GDST_READ(dst,back);
+
+          GBLENDER_LOOKUP( blender, back );
+
+#ifdef GBLENDER_STORE_BYTES
+          GDST_STOREB(dst,_gcells,a);
+#else
+          GDST_STOREP(dst,_gcells,a);
+#endif
+
+          GBLENDER_CLOSE(blender);
+        }
+     }
+
+      src += 4;
+      dst += GDST_INCR;
+    }
+    while (--w > 0);
+
+    src_line += blit->src_pitch;
+    dst_line += blit->dst_pitch;
+  }
+  while (--h > 0);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/graph/gblblit.c 
new/ft2demos-2.5.0/graph/gblblit.c
--- old/ft2demos-2.4.12/graph/gblblit.c 2013-01-22 14:31:35.000000000 +0100
+++ new/ft2demos-2.5.0/graph/gblblit.c  2013-05-29 10:48:10.000000000 +0200
@@ -247,6 +247,18 @@
       }
       break;
 
+  case GBLENDER_SOURCE_BGRA:
+      switch ( dst_format )
+      {
+      case GBLENDER_TARGET_RGB32:  blit_func = _gblender_blit_bgra_rgb32; 
break;
+      case GBLENDER_TARGET_RGB24:  blit_func = _gblender_blit_bgra_rgb24; 
break;
+      case GBLENDER_TARGET_RGB565: blit_func = _gblender_blit_bgra_rgb565; 
break;
+      case GBLENDER_TARGET_BGR565: blit_func = _gblender_blit_bgra_bgr565; 
break;
+      default:
+          ;
+      }
+      break;
+
   default:
     ;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/graph/gblblit.h 
new/ft2demos-2.5.0/graph/gblblit.h
--- old/ft2demos-2.4.12/graph/gblblit.h 2013-01-22 14:31:35.000000000 +0100
+++ new/ft2demos-2.5.0/graph/gblblit.h  2013-05-29 10:48:10.000000000 +0200
@@ -15,6 +15,7 @@
   GBLENDER_SOURCE_HBGR,
   GBLENDER_SOURCE_VRGB,
   GBLENDER_SOURCE_VBGR,
+  GBLENDER_SOURCE_BGRA,
 
   GBLENDER_SOURCE_MAX
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/graph/graph.h 
new/ft2demos-2.5.0/graph/graph.h
--- old/ft2demos-2.4.12/graph/graph.h   2013-01-22 14:31:35.000000000 +0100
+++ new/ft2demos-2.5.0/graph/graph.h    2013-05-29 10:53:55.000000000 +0200
@@ -4,7 +4,7 @@
  *
  *    Graphics Subsystem interface
  *
- *  Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ *  Copyright 1999-2007, 2013
  *     - The FreeType Development Team - www.freetype.org
  *
  ***************************************************************************/
@@ -46,6 +46,7 @@
     gr_pixel_mode_lcdv,        /* vertical RGB-decimated           */
     gr_pixel_mode_lcd2,        /* horizontal BGR-decimated         */
     gr_pixel_mode_lcdv2,       /* vertical BGR-decimated           */
+    gr_pixel_mode_bgra,        /* premultiplied BGRA colors        */
 
     gr_pixel_mode_max          /* don't remove */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/graph/grblit.c 
new/ft2demos-2.5.0/graph/grblit.c
--- old/ft2demos-2.4.12/graph/grblit.c  2013-01-22 14:31:35.000000000 +0100
+++ new/ft2demos-2.5.0/graph/grblit.c   2013-05-29 10:48:10.000000000 +0200
@@ -1867,6 +1867,7 @@
       case gr_pixel_mode_lcdv:  src_format = GBLENDER_SOURCE_VRGB;  break;
       case gr_pixel_mode_lcd2:  src_format = GBLENDER_SOURCE_HBGR;  break;
       case gr_pixel_mode_lcdv2: src_format = GBLENDER_SOURCE_VBGR;  break;
+      case gr_pixel_mode_bgra:  src_format = GBLENDER_SOURCE_BGRA;  break;
 
       default:
           goto DefaultBlit;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ftbench.c 
new/ft2demos-2.5.0/src/ftbench.c
--- old/ft2demos-2.4.12/src/ftbench.c   2013-05-03 08:55:10.000000000 +0200
+++ new/ft2demos-2.5.0/src/ftbench.c    2013-06-12 13:39:38.000000000 +0200
@@ -26,6 +26,7 @@
 #include FT_BBOX_H
 #include FT_MODULE_H
 #include FT_CFF_DRIVER_H
+#include FT_TRUETYPE_DRIVER_H
 
 #ifdef UNIX
 #include <sys/time.h>
@@ -688,7 +689,7 @@
     "  -c N      Use at most N iterations for each test\n"
     "            (0 means time limited).\n"
     "  -f L      Use hex number L as load flags.\n"
-    "  -H        Use alternative CFF engine.\n"
+    "  -H        Use alternative hinting engine (CFF and TTF).\n"
     "  -i IDX    Start with index IDX (default is 0).\n"
     "  -m M      Set maximum cache size to M KByte (default is %d).\n",
            CACHE_SIZE );
@@ -729,14 +730,18 @@
 main(int argc,
      char** argv)
 {
-  FT_Face     face;
-  long        max_bytes = CACHE_SIZE * 1024;
-  char*       test_string = NULL;
-  int         size = FACE_SIZE;
-  int         max_iter = 0;
-  double      max_time = BENCH_TIME;
-  int         compare_cached = 0;
-  int         i;
+  FT_Face   face;
+  FT_Error  error;
+
+  long    max_bytes      = CACHE_SIZE * 1024;
+  char*   test_string    = NULL;
+  int     size           = FACE_SIZE;
+  int     max_iter       = 0;
+  double  max_time       = BENCH_TIME;
+  int     compare_cached = 0;
+  int     i;
+  int     hinting_engine;
+  int     interpreter_version;
 
 
   if ( FT_Init_FreeType( &lib ) )
@@ -746,6 +751,12 @@
     return 1;
   }
 
+  FT_Property_Get( lib, "cff", "hinting-engine",
+                   &hinting_engine );
+
+  FT_Property_Get( lib, "truetype", "interpreter-version",
+                   &interpreter_version );
+
   while ( 1 )
   {
     int  opt;
@@ -775,12 +786,25 @@
       break;
 
     case 'H':
-      {
-        int  hinting_engine = FT_CFF_HINTING_ADOBE;
-
-
-        FT_Property_Set( lib, "cff", "hinting-engine", &hinting_engine );
-      }
+      if ( hinting_engine == FT_CFF_HINTING_ADOBE )
+        hinting_engine = FT_CFF_HINTING_FREETYPE;
+      else
+        hinting_engine = FT_CFF_HINTING_ADOBE;
+
+      error = FT_Property_Set( lib, "cff", "hinting-engine",
+                               &hinting_engine );
+      if ( error )
+        fprintf( stderr, "warning: couldn't change CFF hinting engine\n" );
+
+      if ( interpreter_version == TT_INTERPRETER_VERSION_35 )
+        interpreter_version = TT_INTERPRETER_VERSION_38;
+      else
+        interpreter_version = TT_INTERPRETER_VERSION_35;
+
+      error = FT_Property_Set( lib, "truetype", "interpreter-version",
+                               &interpreter_version );
+      if ( error )
+        fprintf( stderr, "warning: couldn't change TT interpreter version\n" );
       break;
 
     case 'i':
@@ -806,8 +830,6 @@
       size = atoi( optarg );
       if ( size <= 0 )
         size = 1;
-      else if ( size > 500 )
-        size = 500;
       break;
 
     case 't':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ftcommon.c 
new/ft2demos-2.5.0/src/ftcommon.c
--- old/ft2demos-2.4.12/src/ftcommon.c  2013-05-01 11:37:07.000000000 +0200
+++ new/ft2demos-2.5.0/src/ftcommon.c   2013-05-29 10:48:10.000000000 +0200
@@ -297,6 +297,7 @@
     handle->use_sbits = 1;
     handle->autohint  = 0;
     handle->lcd_mode  = 0;
+    handle->color     = 1;
 
     handle->use_sbits_cache = 1;
 
@@ -595,6 +596,9 @@
         flags |= FT_LOAD_MONOCHROME;
     }
 
+    if ( handle->color )
+      flags |= FT_LOAD_COLOR;
+
     handle->load_flags    = flags;
     handle->string_reload = 1;
   }
@@ -718,6 +722,11 @@
       target->grays = source->num_grays;
       break;
 
+    case FT_PIXEL_MODE_BGRA:
+      target->mode  = gr_pixel_mode_bgra;
+      target->grays = source->num_grays;
+      break;
+
     default:
       return FT_Err_Invalid_Glyph_Format;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ftcommon.h 
new/ft2demos-2.5.0/src/ftcommon.h
--- old/ft2demos-2.4.12/src/ftcommon.h  2013-03-24 08:44:28.000000000 +0100
+++ new/ft2demos-2.5.0/src/ftcommon.h   2013-05-29 10:48:10.000000000 +0200
@@ -192,6 +192,7 @@
     int             autohint;          /* force auto-hinting          */
     int             lcd_mode;
     int             preload;           /* force font file preloading  */
+    int             color;             /* load color bitmaps          */
 
     /* don't touch the following fields! */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ftdiff.c 
new/ft2demos-2.5.0/src/ftdiff.c
--- old/ft2demos-2.4.12/src/ftdiff.c    2013-05-01 11:37:07.000000000 +0200
+++ new/ft2demos-2.5.0/src/ftdiff.c     2013-06-03 12:29:47.000000000 +0200
@@ -19,6 +19,7 @@
 #include FT_OUTLINE_H
 #include FT_LCD_FILTER_H
 #include FT_CFF_DRIVER_H
+#include FT_TRUETYPE_DRIVER_H
 
   /* showing driver name -- the two internal header files */
   /* shouldn't be used in normal programs                 */
@@ -185,7 +186,8 @@
     unsigned char  filter_weights[5];
     int            fw_index;
 
-    int            hinting_engine;
+    int            cff_hinting_engine;
+    int            tt_interpreter_version;
 
   } ColumnStateRec, *ColumnState;
 
@@ -228,6 +230,10 @@
                      Display      display,
                      FT_Library   library )
   {
+    FT_UInt  cff_hinting_engine;
+    FT_UInt  tt_interpreter_version;
+
+
     memset( state, 0, sizeof ( *state ) );
 
     state->library = library;
@@ -240,24 +246,33 @@
     state->char_size    = 16;
     state->display      = display[0];
 
-    state->columns[0].use_cboxes            = 0;
-    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].hinting_engine        = FT_CFF_HINTING_FREETYPE;
-    state->columns[0].use_custom_lcd_filter = 0;
-    state->columns[0].fw_index              = 2;
+    /* get the default value as compiled into FreeType */
+    FT_Property_Get( library,
+                     "cff",
+                     "hinting-engine", &cff_hinting_engine );
+    FT_Property_Get( library,
+                     "truetype",
+                     "interpreter-version", &tt_interpreter_version );
+
+    state->columns[0].use_cboxes             = 0;
+    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].cff_hinting_engine     = cff_hinting_engine;
+    state->columns[0].tt_interpreter_version = tt_interpreter_version;
+    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 );
 
-    state->columns[1]                       = state->columns[0];
-    state->columns[1].hint_mode             = HINT_MODE_AUTOHINT;
-    state->columns[1].use_custom_lcd_filter = 1;
+    state->columns[1]                        = state->columns[0];
+    state->columns[1].hint_mode              = HINT_MODE_AUTOHINT;
+    state->columns[1].use_custom_lcd_filter  = 1;
 
-    state->columns[2]                       = state->columns[0];
-    state->columns[2].hint_mode             = HINT_MODE_UNHINTED;
+    state->columns[2]                        = state->columns[0];
+    state->columns[2].hint_mode              = HINT_MODE_UNHINTED;
 
     state->col = 1;
   }
@@ -522,7 +537,10 @@
 
     FT_Property_Set( state->library,
                      "cff",
-                     "hinting-engine", &column->hinting_engine );
+                     "hinting-engine", &column->cff_hinting_engine );
+    FT_Property_Set( state->library,
+                     "truetype",
+                     "interpreter-version", &column->tt_interpreter_version );
 
     if ( column->use_lcd_filter )
       FT_Library_SetLcdFilter( face->glyph->library, column->lcd_filter );
@@ -715,17 +733,32 @@
 
 
       hinting_engine = "";
-      if ( !strcmp( module->clazz->module_name, "cff" ) &&
-           rmode == HINT_MODE_BYTECODE                  )
+      if ( rmode == HINT_MODE_BYTECODE )
       {
-        switch ( column->hinting_engine )
+        if ( !strcmp( module->clazz->module_name, "cff" ) )
         {
-        case FT_CFF_HINTING_FREETYPE:
-          hinting_engine = " (CFF FT)";
-          break;
-        case FT_CFF_HINTING_ADOBE:
-          hinting_engine = " (CFF Adobe)";
-          break;
+          switch ( column->cff_hinting_engine )
+          {
+          case FT_CFF_HINTING_FREETYPE:
+            hinting_engine = " (CFF FT)";
+            break;
+          case FT_CFF_HINTING_ADOBE:
+            hinting_engine = " (CFF Adobe)";
+            break;
+          }
+        }
+
+        else if ( !strcmp( module->clazz->module_name, "truetype" ) )
+        {
+          switch ( column->tt_interpreter_version )
+          {
+          case TT_INTERPRETER_VERSION_35:
+            hinting_engine = " (TT v35)";
+            break;
+          case TT_INTERPRETER_VERSION_38:
+            hinting_engine = " (TT v38)";
+            break;
+          }
         }
       }
 
@@ -1014,7 +1047,7 @@
     grLn();
     grWriteln( "  d            toggle lsb/rsb deltas" );
     grWriteln( "  h            toggle hinting mode" );
-    grWriteln( "  H            cycle hinting engine (if CFF)" );
+    grWriteln( "  H            cycle hinting engine (if CFF or TTF)" );
     grWriteln( "  k            toggle kerning (only from `kern' table)" );
     grWriteln( "  r            toggle rendering mode" );
     grWriteln( "  x            toggle layout mode" );
@@ -1134,12 +1167,41 @@
         FT_Module  module = &state->face->driver->root;
 
 
-        if ( strcmp( module->clazz->module_name, "cff" ) ||
-             column->hint_mode != HINT_MODE_BYTECODE     )
-          break;
+        if ( column->hint_mode == HINT_MODE_BYTECODE )
+        {
+          if ( !strcmp( module->clazz->module_name, "cff" ) )
+          {
+            FT_UInt  new_cff_hinting_engine;
+
 
-        column->hinting_engine =
-          ( column->hinting_engine + 1 ) % HINTING_ENGINE_MAX;
+            new_cff_hinting_engine =
+              ( column->cff_hinting_engine + 1 ) % HINTING_ENGINE_MAX;
+
+            error = FT_Property_Set( state->library,
+                                     "cff",
+                                     "hinting-engine",
+                                     &new_cff_hinting_engine );
+            if ( !error )
+              column->cff_hinting_engine = new_cff_hinting_engine;
+          }
+          else if ( !strcmp( module->clazz->module_name, "truetype" ) )
+          {
+            FT_UInt  new_interpreter_version;
+
+
+            if ( column->tt_interpreter_version == TT_INTERPRETER_VERSION_35 )
+              new_interpreter_version = TT_INTERPRETER_VERSION_38;
+            else
+              new_interpreter_version = TT_INTERPRETER_VERSION_35;
+
+            error = FT_Property_Set( state->library,
+                                     "truetype",
+                                     "interpreter-version",
+                                     &new_interpreter_version );
+            if ( !error )
+              column->tt_interpreter_version = new_interpreter_version;
+          }
+        }
       }
       break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ftview.c 
new/ft2demos-2.5.0/src/ftview.c
--- old/ft2demos-2.4.12/src/ftview.c    2013-05-01 11:37:07.000000000 +0200
+++ new/ft2demos-2.5.0/src/ftview.c     2013-06-10 14:04:46.000000000 +0200
@@ -33,6 +33,7 @@
 #include FT_SYNTHESIS_H
 #include FT_LCD_FILTER_H
 #include FT_CFF_DRIVER_H
+#include FT_TRUETYPE_DRIVER_H
 
 
 #define MAXPTSIZE  500                 /* dtp */
@@ -66,7 +67,7 @@
 #endif
 
 
-#define N_HINTING_ENGINES  2
+#define N_CFF_HINTING_ENGINES  2
 
 
   enum
@@ -98,7 +99,8 @@
     double         radius;
     double         slant;
 
-    int            hinting_engine;    /* for CFF */
+    int            cff_hinting_engine;
+    int            tt_interpreter_version;
 
     int            font_idx;
     int            offset;            /* as selected by the user */
@@ -113,7 +115,7 @@
   } status = { 1,
                DIM_X, DIM_Y, RENDER_MODE_ALL, FT_ENCODING_NONE,
                72, 48, -1, 1.0, 0.04, 0.04, 0.02, 0.22,
-               FT_CFF_HINTING_FREETYPE,
+               0, 0, /* default values are set at runtime */
                0, 0, 0, 0, 0,
                0, { 0x10, 0x40, 0x70, 0x40, 0x10 }, 2 };
 
@@ -769,24 +771,25 @@
     grWriteln( "  backspace cycle backwards               l         cycle 
backwards         " );
     grWriteln( "                                                               
             " );
     grWriteln( "b           toggle embedded bitmaps     x, X        adjust 
horizontal       " );
-    grWriteln( "c           toggle cache modes                       
emboldening (in mode 2)" );
-    grWriteln( "                                        y, Y        adjust 
vertical         " );
-    grWriteln( "p, n        previous/next font                       
emboldening (in mode 2)" );
-    grWriteln( "                                        s, S        adjust 
slanting         " );
-    grWriteln( "Up, Down    adjust size by 1 unit                    (in mode 
3)            " );
-    grWriteln( "PgUp, PgDn  adjust size by 10 units     r, R        adjust 
stroking radius  " );
-    grWriteln( "                                                     (in mode 
4)            " );
-    grWriteln( "Left, Right adjust index by 1                                  
             " );
-    grWriteln( "F7, F8      adjust index by 10          L           toggle 
custom           " );
-    grWriteln( "F9, F10     adjust index by 100                      LCD 
filtering          " );
-    grWriteln( "F11, F12    adjust index by 1000        [, ]        select 
custom LCD       " );
-    grWriteln( "                                                      filter 
weight         " );
-    grWriteln( "h           toggle hinting                            (if 
custom filtering) " );
-    grWriteln( "H           cycle through hinting       -, +(=)     adjust 
selected custom  " );
-    grWriteln( "             engines (if available)                  LCD 
filter weight      " );
-    grWriteln( "f           toggle forced auto-                                
             " );
-    grWriteln( "             hinting (if hinting)       G           show gamma 
ramp         " );
-    grWriteln( "                                        g, v        adjust 
gamma value      " );
+    grWriteln( "c           toggle color glyphs                      
emboldening (in mode 2)" );
+    grWriteln( "K           toggle cache modes          y, Y        adjust 
vertical         " );
+    grWriteln( "                                                     
emboldening (in mode 2)" );
+    grWriteln( "p, n        previous/next font          s, S        adjust 
slanting         " );
+    grWriteln( "                                                     (in mode 
3)            " );
+    grWriteln( "Up, Down    adjust size by 1 unit       r, R        adjust 
stroking radius  " );
+    grWriteln( "PgUp, PgDn  adjust size by 10 units                  (in mode 
4)            " );
+    grWriteln( "                                                               
             " );
+    grWriteln( "Left, Right adjust index by 1           L           toggle 
custom           " );
+    grWriteln( "F7, F8      adjust index by 10                       LCD 
filtering          " );
+    grWriteln( "F9, F10     adjust index by 100         [, ]        select 
custom LCD       " );
+    grWriteln( "F11, F12    adjust index by 1000                      filter 
weight         " );
+    grWriteln( "                                                      (if 
custom filtering) " );
+    grWriteln( "h           toggle hinting              -, +(=)     adjust 
selected custom  " );
+    grWriteln( "H           cycle through hinting                    LCD 
filter weight      " );
+    grWriteln( "             engines (if available)                            
             " );
+    grWriteln( "f           toggle forced auto-         G           show gamma 
ramp         " );
+    grWriteln( "             hinting (if hinting)       g, v        adjust 
gamma value      " );
+    grWriteln( "                                                               
             " );
     grWriteln( "a           toggle anti-aliasing                               
             " );
     /*          |----------------------------------|    
|----------------------------------| */
     grLn();
@@ -866,20 +869,64 @@
   }
 
 
-  static void
-  event_hinting_engine_change( int  delta )
+  static int
+  event_cff_hinting_engine_change( int  delta )
   {
+    int  new_cff_hinting_engine;
+
+
     if ( delta )
-      status.hinting_engine = ( status.hinting_engine +
-                                delta                 +
-                                N_HINTING_ENGINES     ) % N_HINTING_ENGINES;
+      new_cff_hinting_engine =
+        ( status.cff_hinting_engine +
+          delta                     +
+          N_CFF_HINTING_ENGINES     ) % N_CFF_HINTING_ENGINES;
+
+    error = FT_Property_Set( handle->library,
+                             "cff",
+                             "hinting-engine",
+                             &new_cff_hinting_engine );
+
+    if ( !error )
+    {
+      /* Resetting the cache is perhaps a bit harsh, but I'm too  */
+      /* lazy to walk over all loaded fonts to check whether they */
+      /* are of type CFF, then unloading them explicitly.         */
+      FTC_Manager_Reset( handle->cache_manager );
+      status.cff_hinting_engine = new_cff_hinting_engine;
+      return 1;
+    }
 
-    FT_Property_Set( handle->library,
-                     "cff",
-                     "hinting-engine", &status.hinting_engine );
+    return 0;
+  }
+
+
+  static int
+  event_tt_interpreter_version_change( void )
+  {
+    FT_UInt  new_interpreter_version;
+
+
+    if ( status.tt_interpreter_version == TT_INTERPRETER_VERSION_35 )
+      new_interpreter_version = TT_INTERPRETER_VERSION_38;
+    else
+      new_interpreter_version = TT_INTERPRETER_VERSION_35;
+
+    error = FT_Property_Set( handle->library,
+                             "truetype",
+                             "interpreter-version",
+                             &new_interpreter_version );
+
+    if ( !error )
+    {
+      /* Resetting the cache is perhaps a bit harsh, but I'm too  */
+      /* lazy to walk over all loaded fonts to check whether they */
+      /* are of type TTF, then unloading them explicitly.         */
+      FTC_Manager_Reset( handle->cache_manager );
+      status.tt_interpreter_version = new_interpreter_version;
+      return 1;
+    }
 
-    FTC_Manager_RemoveFaceID( handle->cache_manager,
-                              handle->scaler.face_id );
+    return 0;
   }
 
 
@@ -1086,6 +1133,12 @@
       break;
 
     case grKEY( 'c' ):
+      handle->color = !handle->color;
+      FTDemo_Update_Current_Flags( handle );
+      status.update = 1;
+      break;
+
+    case grKEY( 'K' ):
       handle->use_sbits_cache = !handle->use_sbits_cache;
       status.update = 1;
       break;
@@ -1118,11 +1171,11 @@
         if ( !error )
         {
           module = &face->driver->root;
+
           if ( !strcmp( module->clazz->module_name, "cff" ) )
-          {
-            event_hinting_engine_change( 1 );
-            status.update = 1;
-          }
+            status.update = event_cff_hinting_engine_change( 1 );
+          else if ( !strcmp( module->clazz->module_name, "truetype" ) )
+            status.update = event_tt_interpreter_version_change();
         }
       }
       break;
@@ -1420,7 +1473,7 @@
     if ( !( status.render_mode == RENDER_MODE_TEXT      ||
             status.render_mode == RENDER_MODE_WATERFALL ) )
     {
-      const char*  encoding;
+      const char*  encoding = NULL;
 
 
       switch ( status.encoding )
@@ -1489,7 +1542,7 @@
 
     /* render mode */
     {
-      const char*  render_mode;
+      const char*  render_mode = NULL;
 
 
       switch ( status.render_mode )
@@ -1563,7 +1616,7 @@
 
     if ( handle->antialias )
     {
-      const char*  lcd_mode;
+      const char*  lcd_mode = NULL;
 
 
       switch ( handle->lcd_mode )
@@ -1612,13 +1665,13 @@
     {
       /* hinting engine */
 
-      FT_Module    module = &face->driver->root;
-      const char*  hinting_engine;
+      FT_Module    module         = &face->driver->root;
+      const char*  hinting_engine = NULL;
 
 
       if ( !strcmp( module->clazz->module_name, "cff" ) )
       {
-        switch ( status.hinting_engine )
+        switch ( status.cff_hinting_engine )
         {
         case FT_CFF_HINTING_FREETYPE:
           hinting_engine = "FreeType";
@@ -1627,7 +1680,23 @@
           hinting_engine = "Adobe";
           break;
         }
+      }
+
+      else if ( !strcmp( module->clazz->module_name, "truetype" ) )
+      {
+        switch ( status.tt_interpreter_version )
+        {
+        case TT_INTERPRETER_VERSION_35:
+          hinting_engine = "v35";
+          break;
+        case TT_INTERPRETER_VERSION_38:
+          hinting_engine = "v38";
+          break;
+        }
+      }
 
+      if ( hinting_engine )
+      {
         sprintf( buf, "engine: %s",
                       hinting_engine );
         grWriteCellString( display->bitmap, 0, (line++) * HEADER_HEIGHT,
@@ -1643,6 +1712,12 @@
     grWriteCellString( display->bitmap, 0, (line++) * HEADER_HEIGHT,
                        buf, display->fore_color );
 
+    /* embedded color bitmaps */
+    sprintf( buf, "color bitmaps: %s",
+                  handle->color ? "on" : "off" );
+    grWriteCellString( display->bitmap, 0, (line++) * HEADER_HEIGHT,
+                       buf, display->fore_color );
+
     /* cache */
     sprintf( buf, "cache: %s",
                   handle->use_sbits_cache ? "on" : "off" );
@@ -1848,9 +1923,14 @@
     parse_cmdline( &argc, &argv );
 
     FT_Library_SetLcdFilter( handle->library, FT_LCD_FILTER_DEFAULT );
-    FT_Property_Set( handle->library,
+
+    /* get the default value as compiled into FreeType */
+    FT_Property_Get( handle->library,
                      "cff",
-                     "hinting-engine", &status.hinting_engine );
+                     "hinting-engine", &status.cff_hinting_engine );
+    FT_Property_Get( handle->library,
+                     "truetype",
+                     "interpreter-version", &status.tt_interpreter_version );
 
     handle->encoding = status.encoding;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ft2demos-2.4.12/src/ttdebug.c 
new/ft2demos-2.5.0/src/ttdebug.c
--- old/ft2demos-2.4.12/src/ttdebug.c   2013-02-06 17:29:08.000000000 +0100
+++ new/ft2demos-2.5.0/src/ttdebug.c    2013-06-09 20:16:41.000000000 +0200
@@ -52,6 +52,8 @@
 #include FT_FREETYPE_H
 #include "common.h"
 
+#include FT_TRUETYPE_DRIVER_H
+
   /* The following header shouldn't be used in normal programs.    */
   /* `freetype2/src/truetype' must be in the current include path. */
 #include "ttobjs.h"
@@ -71,6 +73,11 @@
   TT_GlyphSlot    glyph;      /* truetype glyph slot */
   TT_ExecContext  exec;       /* truetype execution context */
 
+  int  default_version;       /* default TrueType engine version */
+  int  alternative_version;   /* alternative TrueType engine version */
+
+  FT_Bool  use_float = FALSE; /* number format */
+
   FT_Error  error;
 
   typedef char  ByteStr[2];
@@ -883,6 +890,8 @@
     TT_GlyphZoneRec  save;
     TT_GlyphZoneRec  pts;
 
+    const FT_String*  code_range;
+
     const FT_String*  round_str[8] =
     {
       "to half-grid",
@@ -914,6 +923,23 @@
 
     CUR.instruction_trap = 1;
 
+    switch ( CUR.curRange )
+    {
+    case tt_coderange_glyph:
+      code_range = "glyf";
+      break;
+
+    case tt_coderange_cvt:
+      code_range = "prep";
+      break;
+
+    default:
+      code_range = "fpgm";
+    }
+
+    printf( "Entering `%s' table.\n"
+            "\n", code_range );
+
     do
     {
       if ( CUR.IP < CUR.codeSize )
@@ -1043,48 +1069,126 @@
                   "v   show vector info\n"
                   "g   show graphics state\n"
                   "p   show points zone\n"
+                  "f   toggle between floating and fixed point number format\n"
+                  "l   show last bytecode instruction\n"
+                  "\n"
+                  "\n"
+                  "  Format of point changes:\n"
+                  "\n"
+                  "    idx   orus.x  orus.y  tags  org.x  org.y  cur.x  
cur.y\n"
+                  "\n"
+                  "  The first line gives the values before the instruction,\n"
+                  "  the second line the changes after the instruction,\n"
+                  "  indicated by parentheses and brackets for emphasis.\n"
+                  "\n"
+                  "  Tag values (which are ORed):\n"
+                  "\n"
+                  "    1 on curve\n"
+                  "    2 touched along the X axis\n"
+                  "    4 touched along the Y axis\n"
                   "\n" );
           break;
 
+        /* Toggle between floating and fixed point format */
+        case 'f':
+          use_float = !use_float;
+          printf( "use %s point format for displaying values\n",
+                  use_float ? "floating" : "fixed" );
+          printf( "\n" );
+          break;
+
         /* Show vectors */
         case 'v':
-          printf( "freedom    (%04hx,%04hx)\n",
-                  CUR.GS.freeVector.x,
-                  CUR.GS.freeVector.y );
-          printf( "projection (%04hx,%04hx)\n",
-                  CUR.GS.projVector.x,
-                  CUR.GS.projVector.y );
-          printf( "dual       (%04hx,%04hx)\n\n",
-                  CUR.GS.dualVector.x,
-                  CUR.GS.dualVector.y );
+          if ( use_float )
+          {
+            /* 2.14 numbers */
+            printf( "freedom    (%.5f, %.5f)\n",
+                    CUR.GS.freeVector.x / 16384.0,
+                    CUR.GS.freeVector.y / 16384.0 );
+            printf( "projection (%.5f, %.5f)\n",
+                    CUR.GS.projVector.x / 16384.0,
+                    CUR.GS.projVector.y / 16384.0 );
+            printf( "dual       (%.5f, %.5f)\n",
+                    CUR.GS.dualVector.x / 16384.0,
+                    CUR.GS.dualVector.y / 16384.0 );
+            printf( "\n" );
+          }
+          else
+          {
+            printf( "freedom    ($%04hx, $%04hx)\n",
+                    CUR.GS.freeVector.x,
+                    CUR.GS.freeVector.y );
+            printf( "projection ($%04hx, $%04hx)\n",
+                    CUR.GS.projVector.x,
+                    CUR.GS.projVector.y );
+            printf( "dual       ($%04hx, $%04hx)\n",
+                    CUR.GS.dualVector.x,
+                    CUR.GS.dualVector.y );
+            printf( "\n" );
+          }
           break;
 
         /* Show graphics state */
         case 'g':
-          printf( "rounding   %s\n",
+          printf( "rounding state      %s\n",
                   round_str[CUR.GS.round_state] );
-          printf( "min dist   %04lx\n",
-                  CUR.GS.minimum_distance );
-          printf( "cvt_cutin  %04lx\n",
-                  CUR.GS.control_value_cutin );
-          printf( "RP 0,1,2   %4x %4x %4x\n",
+          if ( use_float )
+          {
+            /* 26.6 numbers */
+            printf( "minimum distance    %.2f\n",
+                    CUR.GS.minimum_distance / 64.0 );
+            printf( "CVT cut-in          %.2f\n",
+                    CUR.GS.control_value_cutin / 64.0 );
+          }
+          else
+          {
+            printf( "minimum distance    $%04lx\n",
+                    CUR.GS.minimum_distance );
+            printf( "CVT cut-in          $%04lx\n",
+                    CUR.GS.control_value_cutin );
+          }
+          printf( "ref. points 0,1,2   %d, %d, %d\n",
                   CUR.GS.rp0, CUR.GS.rp1, CUR.GS.rp2 );
+          printf( "\n" );
           break;
 
         /* Show points table */
         case 'p':
+          if ( CUR.pts.n_points )
+          {
+            printf( "idx  "
+                    "orig. unscaled  - "
+                    "orig. scaled        - "
+                    "current scaled     \n" );
+            printf( "-----"
+                    "------------------"
+                    "----------------------"
+                    "-------------------\n" );
+          }
+          else
+            printf( "not yet in `glyf' program\n" );
+
           for ( A = 0; A < CUR.pts.n_points; A++ )
           {
             printf( "%3d  ",
                     A );
             printf( "(%6ld,%6ld) - ",
                     pts.orus[A].x, pts.orus[A].y );
-            printf( "(%8ld,%8ld) - ",
-                    pts.org[A].x, pts.org[A].y );
-            printf( "(%8ld,%8ld)\n",
-                    pts.cur[A].x, pts.cur[A].y );
+            if ( use_float )
+            {
+              printf( "(%8.2f,%8.2f) - ",
+                      pts.org[A].x / 64.0, pts.org[A].y / 64.0 );
+              printf( "(%8.2f,%8.2f)\n",
+                      pts.cur[A].x / 64.0, pts.cur[A].y / 64.0 );
+            }
+            else
+            {
+              printf( "(%8ld,%8ld) - ",
+                      pts.org[A].x, pts.org[A].y );
+              printf( "(%8ld,%8ld)\n",
+                      pts.cur[A].x, pts.cur[A].y );
+            }
           }
-
           printf( "\n" );
           break;
 
@@ -1152,6 +1256,11 @@
         oldch = ch;
         break;
 
+      /* show last bytecode instruction */
+      case 'l':
+        oldch = ch;
+        break;
+
       default:
         printf( "Unknown command.  Press ? for help\n" );
         oldch = '\0';
@@ -1186,28 +1295,40 @@
           printf( temp, old_tag_to_new( save.tags[A] ) );
 
           if ( diff & 1 )
-            temp = "(%8ld)";
+            temp = use_float ? "(%8.2f)" : "(%8ld)";
           else
-            temp = " %8ld ";
-          printf( temp, save.org[A].x );
+            temp = use_float ? " %8.2f " : " %8ld ";
+          if ( use_float )
+            printf( temp, save.org[A].x / 64.0 );
+          else
+            printf( temp, save.org[A].x );
 
           if ( diff & 2 )
-            temp = "(%8ld)";
+            temp = use_float ? "(%8.2f)" : "(%8ld)";
+          else
+            temp = use_float ? " %8.2f " : " %8ld ";
+          if ( use_float )
+            printf( temp, save.org[A].y / 64.0 );
           else
-            temp = " %8ld ";
-          printf( temp, save.org[A].y );
+            printf( temp, save.org[A].y );
 
           if ( diff & 4 )
-            temp = "(%8ld)";
+            temp = use_float ? "(%8.2f)" : "(%8ld)";
           else
-            temp = " %8ld ";
-          printf( temp, save.cur[A].x );
+            temp = use_float ? " %8.2f " : " %8ld ";
+          if ( use_float )
+            printf( temp, save.cur[A].x / 64.0 );
+          else
+            printf( temp, save.cur[A].x );
 
           if ( diff & 8 )
-            temp = "(%8ld)";
+            temp = use_float ? "(%8.2f)" : "(%8ld)";
+          else
+            temp = use_float ? " %8.2f " : " %8ld ";
+          if ( use_float )
+            printf( temp, save.cur[A].y / 64.0 );
           else
-            temp = " %8ld ";
-          printf( temp, save.cur[A].y );
+            printf( temp, save.cur[A].y );
 
           printf( "\n" );
 
@@ -1220,28 +1341,40 @@
           printf( temp, old_tag_to_new( pts.tags[A] ) );
 
           if ( diff & 1 )
-            temp = "[%8ld]";
+            temp = use_float ? "[%8.2f]" : "[%8ld]";
           else
             temp = "          ";
-          printf( temp, pts.org[A].x );
+          if ( use_float )
+            printf( temp, pts.org[A].x / 64.0 );
+          else
+            printf( temp, pts.org[A].x );
 
           if ( diff & 2 )
-            temp = "[%8ld]";
+            temp = use_float ? "[%8.2f]" : "[%8ld]";
           else
             temp = "          ";
-          printf( temp, pts.org[A].y );
+          if ( use_float )
+            printf( temp, pts.org[A].y / 64.0 );
+          else
+            printf( temp, pts.org[A].y );
 
           if ( diff & 4 )
-            temp = "[%8ld]";
+            temp = use_float ? "[%8.2f]" : "[%8ld]";
           else
             temp = "          ";
-          printf( temp, pts.cur[A].x );
+          if ( use_float )
+            printf( temp, pts.cur[A].x / 64.0 );
+          else
+            printf( temp, pts.cur[A].x );
 
           if ( diff & 8 )
-            temp = "[%8ld]";
+            temp = use_float ? "[%8.2f]" : "[%8ld]";
           else
             temp = "          ";
-          printf( temp, pts.cur[A].y );
+          if ( use_float )
+            printf( temp, pts.cur[A].y / 64.0 );
+          else
+            printf( temp, pts.cur[A].y );
 
           printf( "\n" );
         }
@@ -1256,7 +1389,7 @@
 
 
   static void
-  Usage( char* execname )
+  Usage( char*  execname )
   {
     fprintf( stderr,
       "\n"
@@ -1271,10 +1404,12 @@
       "  size      The size of the glyph in pixels (ppem).\n"
       "  font      The TrueType font file to debug.\n"
       "\n"
+      "  -H        Use hinting engine version %d (default is version %d).\n"
       "  -v        Show version.\n"
       "\n"
       "While running, press the `?' key for help.\n"
-      "\n" );
+      "\n",
+      alternative_version, default_version );
 
     exit( 1 );
   }
@@ -1292,23 +1427,41 @@
     char*  execname;
     int    option;
 
+    int  change_interpreter_version = 0;
+
 
     /* init library, read face object, get driver, create size */
     error = FT_Init_FreeType( &library );
     if ( error )
       Abort( "could not initialize FreeType library" );
 
+    memory = library->memory;
+    driver = (FT_Driver)FT_Get_Module( library, "truetype" );
+    if ( !driver )
+      Abort( "could not find the TrueType driver in FreeType 2\n" );
+
+    FT_Property_Get( library,
+                     "truetype",
+                     "interpreter-version", &default_version );
+    alternative_version = default_version == TT_INTERPRETER_VERSION_35
+                          ? TT_INTERPRETER_VERSION_38
+                          : TT_INTERPRETER_VERSION_35;
+
     execname = ft_basename( argv[0] );
 
     while ( 1 )
     {
-      option = getopt( argc, argv, "v" );
+      option = getopt( argc, argv, "Hv" );
 
       if ( option == -1 )
         break;
 
       switch ( option )
       {
+      case 'H':
+        change_interpreter_version = 1;
+        break;
+
       case 'v':
         {
           FT_Int  major, minor, patch;
@@ -1355,10 +1508,14 @@
 
     Init_Keyboard();
 
-    memory = library->memory;
-    driver = (FT_Driver)FT_Get_Module( library, "truetype" );
-    if ( !driver )
-      Abort( "could not find the TrueType driver in FreeType 2\n" );
+    if ( change_interpreter_version )
+    {
+      error = FT_Property_Set( library,
+                               "truetype",
+                               "interpreter-version", &alternative_version );
+      if ( error )
+        Abort( "could not select alternative TrueType engine version" );
+    }
 
     FT_Set_Debug_Hook( library,
                        FT_DEBUG_HOOK_TRUETYPE,

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to