Commit 13fa21bd5ed7b731a921da5e3c645c5d88f0b1ab

Werner Lemberg 2010-01-14T21:34:08

Make FT_Set_Transform work if no renderer is available. * src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation if no renderer is compiled into the library.

diff --git a/ChangeLog b/ChangeLog
index 44d596e..ae13bf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-01-14  Werner Lemberg  <wl@gnu.org>
 
+	Make FT_Set_Transform work if no renderer is available.
+
+	* src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation
+	if no renderer is compiled into the library.
+
+2010-01-14  Werner Lemberg  <wl@gnu.org>
+
 	Fix compilation warning.
 
 	* src/base/ftbase.h: s/LOCAL_DEF/LOCAL/.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index e4cbb7d..46bcd3b 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -742,6 +742,19 @@
                                      renderer, slot,
                                      &internal->transform_matrix,
                                      &internal->transform_delta );
+        else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
+        {
+          /* apply `standard' transformation if no renderer is available */
+          if ( &internal->transform_matrix )
+            FT_Outline_Transform( &slot->outline,
+                                  &internal->transform_matrix );
+
+          if ( &internal->transform_delta )
+            FT_Outline_Translate( &slot->outline,
+                                  internal->transform_delta.x,
+                                  internal->transform_delta.y );
+        }
+
         /* transform advance */
         FT_Vector_Transform( &slot->advance, &internal->transform_matrix );
       }