freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 1b2abda: * src/base/ftobjs.c (FT_Load_Glyph): Improve


From: Werner LEMBERG
Subject: [freetype2] master 1b2abda: * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
Date: Sun, 13 May 2018 04:59:02 -0400 (EDT)

branch: master
commit 1b2abda9d23b218e08e240fc3d062661c22258d1
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
---
 ChangeLog         |  4 ++++
 src/base/ftobjs.c | 39 ++++++++++++++++++++++++++++-----------
 2 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3ccfdf5..03978b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-13  Werner Lemberg  <address@hidden>
+
+       * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
+
 2018-05-13  Shao Yu Zhang  <address@hidden>
            Werner Lemberg  <address@hidden>
 
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 3696c81..2731903 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1024,17 +1024,34 @@
         ft_glyphslot_preset_bitmap( slot, mode, NULL );
     }
 
-    FT_TRACE5(( "FT_Load_Glyph: index %d, flags %x\n",
-                glyph_index, load_flags               ));
-    FT_TRACE5(( "  x advance: %f\n", slot->advance.x / 64.0 ));
-    FT_TRACE5(( "  y advance: %f\n", slot->advance.y / 64.0 ));
-    FT_TRACE5(( "  linear x advance: %f\n",
-                slot->linearHoriAdvance / 65536.0 ));
-    FT_TRACE5(( "  linear y advance: %f\n",
-                slot->linearVertAdvance / 65536.0 ));
-    FT_TRACE5(( "  bitmap %dx%d, mode %d\n",
-                slot->bitmap.width, slot->bitmap.rows,
-                slot->bitmap.pixel_mode               ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+    {
+      const char*  pixel_modes[] = { "none",
+                                     "monochrome bitmap",
+                                     "gray 8-bit bitmap",
+                                     "gray 2-bit bitmap",
+                                     "gray 4-bit bitmap",
+                                     "LCD 8-bit bitmap",
+                                     "vertical LCD 8-bit bitmap",
+                                     "BGRA 32-bit color image bitmap"
+                                   };
+
+
+      FT_TRACE5(( "FT_Load_Glyph: index %d, flags 0x%x\n",
+                  glyph_index, load_flags ));
+      FT_TRACE5(( "  x advance: %f\n", slot->advance.x / 64.0 ));
+      FT_TRACE5(( "  y advance: %f\n", slot->advance.y / 64.0 ));
+      FT_TRACE5(( "  linear x advance: %f\n",
+                  slot->linearHoriAdvance / 65536.0 ));
+      FT_TRACE5(( "  linear y advance: %f\n",
+                  slot->linearVertAdvance / 65536.0 ));
+      FT_TRACE5(( "  bitmap %dx%d, %s (mode %d)\n",
+                  slot->bitmap.width,
+                  slot->bitmap.rows,
+                  pixel_modes[slot->bitmap.pixel_mode],
+                  slot->bitmap.pixel_mode ));
+    }
+#endif
 
   Exit:
     return error;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]