Better tracing of loaded glyphs. Previously, the loading of a glyph was traced at level 4, if at all. With this change, all font loading routines emit a tracing message at level 1, making it easier to select tracing output (for example using F2_DEBUG="any:1 afhints:7 aflatin:7"). * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. * src/cff/cffdrivr.c (cff_glyph_load): Ditto. * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing messages. * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing message. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
diff --git a/ChangeLog b/ChangeLog
index 232a206..e462c91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
2013-08-26 Werner Lemberg <wl@gnu.org>
+ Better tracing of loaded glyphs.
+
+ Previously, the loading of a glyph was traced at level 4, if at all.
+ With this change, all font loading routines emit a tracing message
+ at level 1, making it easier to select tracing output (for example
+ using F2_DEBUG="any:1 afhints:7 aflatin:7").
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
+ * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
+ * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
+ messages.
+ * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
+ message.
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
+ * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
+ * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
+ * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
+
+2013-08-26 Werner Lemberg <wl@gnu.org>
+
[autofit] Fix script selection.
* src/autofit/afglobal.c (af_face_globals_get_metrics): Use
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 0ea0a5e..a0ddd28 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -674,6 +674,8 @@ THE SOFTWARE.
goto Exit;
}
+ FT_TRACE1(( "BDF_Glyph_Load: glyph index %d\n", glyph_index ));
+
/* index 0 is the undefined glyph */
if ( glyph_index == 0 )
glyph_index = bdf->default_glyph;
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 51fc735..dde7d44 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -164,6 +164,8 @@
if ( !slot )
return FT_THROW( Invalid_Slot_Handle );
+ FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index ));
+
/* check whether we want a scaled outline or bitmap */
if ( !size )
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 6a8494f..c8e9f91 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -434,7 +434,7 @@
goto Exit;
}
- FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
+ FT_TRACE3(( " in subfont %d:\n", fd_index ));
sub = cff->subfonts[fd_index];
@@ -447,10 +447,6 @@
builder->hints_globals = (void *)internal->subfonts[fd_index];
}
}
-#ifdef FT_DEBUG_LEVEL_TRACE
- else
- FT_TRACE3(( "glyph index %d:\n", glyph_index ));
-#endif
decoder->num_locals = sub->local_subrs_index.count;
decoder->locals = sub->local_subrs;
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index a1a8658..7febab8 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -58,7 +58,7 @@
#endif
- FT_TRACE4(( "cid_load_glyph: glyph index %d\n", glyph_index ));
+ FT_TRACE1(( "cid_load_glyph: glyph index %d\n", glyph_index ));
#ifdef FT_CONFIG_OPTION_INCREMENTAL
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 9ceff7f..ac824bd 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -481,7 +481,7 @@ THE SOFTWARE.
FT_UNUSED( load_flags );
- FT_TRACE4(( "load_glyph %d ---", glyph_index ));
+ FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index ));
if ( !face || glyph_index >= (FT_UInt)face->root.num_glyphs )
{
@@ -575,8 +575,6 @@ THE SOFTWARE.
( face->accel.fontAscent +
face->accel.fontDescent ) << 6 );
- FT_TRACE4(( " --- ok\n" ));
-
Exit:
return error;
}
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 88b4d66..2ce0937 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -763,7 +763,7 @@
PFR_SubGlyph subglyph;
- FT_TRACE4(( "subglyph %d:\n", n ));
+ FT_TRACE4(( " subglyph %d:\n", n ));
subglyph = glyph->subs + old_count + n;
old_points = base->n_points;
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 75fc4c3..8d3cd29 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -324,6 +324,8 @@
FT_ULong gps_offset;
+ FT_TRACE1(( "pfr_slot_load: glyph index %d\n", gindex ));
+
if ( gindex > 0 )
gindex--;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index f640a6c..10a04f4 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2204,6 +2204,8 @@
error = FT_Err_Ok;
+ FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index ));
+
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* try to load embedded bitmap if any */
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 23478d1..35f5b57 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -300,6 +300,8 @@
goto Exit;
}
+ FT_TRACE1(( "T1_Load_Glyph: glyph index %d\n", glyph_index ));
+
FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );
if ( load_flags & FT_LOAD_NO_RECURSE )
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index c9a1c47..c1c3e08 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -648,6 +648,8 @@
FT_Driver_Class ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz;
+ FT_TRACE1(( "T42_GlyphSlot_Load: glyph index %d\n", glyph_index ));
+
t42_glyphslot_clear( t42slot->ttslot );
error = ttclazz->load_glyph( t42slot->ttslot,
t42size->ttsize,
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index ff2ee95..6843243 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -984,6 +984,8 @@
goto Exit;
}
+ FT_TRACE1(( "FNT_Load_Glyph: glyph index %d\n", glyph_index ));
+
if ( glyph_index > 0 )
glyph_index--; /* revert to real index */
else