[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.
2.6.5
Werner Lemberg 12 years ago
parent 278f64b330
commit 5e53db25ff
  1. 13
      ChangeLog
  2. 10
      src/autofit/afcjk.c
  3. 16
      src/autofit/afglobal.c
  4. 4
      src/autofit/afglobal.h
  5. 10
      src/autofit/aflatin.c

@ -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.

@ -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 */

@ -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

@ -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

@ -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 */

Loading…
Cancel
Save