[autofit] While tracing, report script names instead of ID values.

* src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
New array.
* src/autofit/afglobal.h: Updated.

* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
af_cjk_hint_edges): Use `af_script_names'.
* src/autofit/aflatin.c (af_latin_metrics_init_widths,
af_latin_hint_edges): Ditto.
This commit is contained in:
Werner Lemberg 2013-08-27 18:37:39 +02:00
parent 278f64b330
commit 5e53db25ff
5 changed files with 43 additions and 10 deletions

View File

@ -1,3 +1,16 @@
2013-08-27 Werner Lemberg <wl@gnu.org>
[autofit] While tracing, report script names instead of ID values.
* src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
New array.
* src/autofit/afglobal.h: Updated.
* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
af_cjk_hint_edges): Use `af_script_names'.
* src/autofit/aflatin.c (af_latin_metrics_init_widths,
af_latin_hint_edges): Ditto.
2013-08-26 Werner Lemberg <wl@gnu.org>
[autofit] Report used script while hinting a glyph.

View File

@ -74,10 +74,10 @@
FT_TRACE5(( "\n"
"cjk standard widths computation (script %d)\n"
"===========================================\n"
"cjk standard widths computation (script `%s')\n"
"===============================================\n"
"\n",
metrics->root.script_class->script ));
af_script_names[metrics->root.script_class->script] ));
af_glyph_hints_init( hints, face->memory );
@ -1665,9 +1665,9 @@
#endif
FT_TRACE5(( "cjk %s edge hinting (script %d)\n",
FT_TRACE5(( "cjk %s edge hinting (script `%s')\n",
dim == AF_DIMENSION_VERT ? "horizontal" : "vertical",
hints->metrics->script_class->script ));
af_script_names[hints->metrics->script_class->script] ));
/* we begin by aligning all stems relative to the blue zone */

View File

@ -61,6 +61,22 @@
#endif /* !FT_CONFIG_OPTION_PIC */
#ifdef FT_DEBUG_LEVEL_TRACE
#undef SCRIPT
#define SCRIPT( s, S ) #s,
FT_LOCAL_ARRAY_DEF( char* )
af_script_names[] =
{
#include "afscript.h"
};
#endif /* FT_DEBUG_LEVEL_TRACE */
/* Compute the script index of each glyph within a given face. */
static FT_Error

View File

@ -34,6 +34,10 @@ FT_BEGIN_HEADER
FT_LOCAL_ARRAY( AF_ScriptClass )
af_script_classes[];
#ifdef FT_DEBUG_LEVEL_TRACE
FT_LOCAL_ARRAY( char* )
af_script_names[];
#endif
/*
* Default values and flags for both autofitter globals (found in

View File

@ -61,10 +61,10 @@
FT_TRACE5(( "\n"
"latin standard widths computation (script %d)\n"
"=============================================\n"
"latin standard widths computation (script `%s')\n"
"=================================================\n"
"\n",
metrics->root.script_class->script ));
af_script_names[metrics->root.script_class->script] ));
af_glyph_hints_init( hints, face->memory );
@ -1897,9 +1897,9 @@
#endif
FT_TRACE5(( "latin %s edge hinting (script %d)\n",
FT_TRACE5(( "latin %s edge hinting (script `%s')\n",
dim == AF_DIMENSION_VERT ? "horizontal" : "vertical",
hints->metrics->script_class->script ));
af_script_names[hints->metrics->script_class->script] ));
/* we begin by aligning all stems relative to the blue zone */
/* if needed -- that's only for horizontal edges */