From 3315d16d9966d0def778de32362070255545c563 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 16 Jan 2014 12:42:16 +0100 Subject: [PATCH] Trace fallback style assignment. This is handled in `TA_sfnt_adjust_master_coverage', after it has been temporarily changed in `TA_sfnt_handle_coverage'. --- lib/taglyf.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lib/taglyf.c b/lib/taglyf.c index b21074b..3ef64fa 100644 --- a/lib/taglyf.c +++ b/lib/taglyf.c @@ -1307,6 +1307,9 @@ TA_sfnt_adjust_master_coverage(SFNT* sfnt, { FT_Long nn; FT_Byte* gstyles = master_globals->glyph_styles; +#ifdef TA_DEBUG + FT_UInt count; +#endif for (nn = 0; nn < master_globals->glyph_count; nn++) @@ -1317,6 +1320,37 @@ TA_sfnt_adjust_master_coverage(SFNT* sfnt, gstyles[nn] |= master_globals->font->fallback_style; } } + +#ifdef TA_DEBUG + + TA_LOG_GLOBAL(("\n" + "using fallback style `%s' for unassigned glyphs:\n", + ta_style_names[master_globals->font->fallback_style])); + + count = 0; + + for (nn = 0; nn < master_globals->glyph_count; nn++) + { + if ((gstyles[nn] & ~TA_DIGIT) == master_globals->font->fallback_style) + { + if (!(count % 10)) + TA_LOG_GLOBAL((" ")); + + TA_LOG_GLOBAL((" %d", nn)); + count++; + + if (!(count % 10)) + TA_LOG_GLOBAL(("\n")); + } + } + + if (!count) + TA_LOG_GLOBAL((" (none)\n")); + if (count % 10) + TA_LOG_GLOBAL(("\n")); + +#endif /* TA_DEBUG */ + return 1; /* master coverage adjusted */ } else -- 2.11.4.GIT