diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-05-29 23:57:39 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-05-29 23:57:39 +0000 |
commit | 34bdbe6cca8c6083c29682661cc9d26912561c04 (patch) | |
tree | 5bca08b79368e03c2fa334965636b41b9c3b2382 | |
parent | 2c78eb003e80b3110f26822af3e7c163bc9f5a94 (diff) | |
download | netpbm-mirror-34bdbe6cca8c6083c29682661cc9d26912561c04.tar.gz netpbm-mirror-34bdbe6cca8c6083c29682661cc9d26912561c04.tar.xz netpbm-mirror-34bdbe6cca8c6083c29682661cc9d26912561c04.zip |
Change verbosity of missing glyph messages
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3821 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | generator/pbmtext.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/generator/pbmtext.c b/generator/pbmtext.c index f9ba2cfa..c288b523 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -321,9 +321,8 @@ reportAbsentGlyphs(bool const wchar, !codepointIsValid(fontP, codepoint)) { ++missingCharCt; if (missingCharCt == 1) { /* initial */ - pm_message ("%u characters found in text", - textSelectorP->count);; - pm_message ("failed to load glyph data for:"); + pm_message("failed to load glyph data for these code points " + "in input:"); } pm_message(wchar ? "+%05X %s" : "%02X %s", @@ -331,8 +330,6 @@ reportAbsentGlyphs(bool const wchar, charDescription(codepoint)); } } - if (missingCharCt > 0) - pm_message("total %u characters absent in font", missingCharCt); *missingCharCtP = missingCharCt; } @@ -344,6 +341,7 @@ validateFont(bool const wchar, struct font2 * const fontP, const struct pm_selector * const textSelectorP, enum FixMode const fixmode, + bool const verbose, bool * const hasAllCharsP) { /*---------------------------------------------------------------------------- If any glyphs required by the text indicated by *textSelectorP are missing @@ -358,11 +356,13 @@ validateFont(bool const wchar, unsigned int missingCharCt; assert (textSelectorP != NULL); - assert (textSelectorP->count >= 0); + assert(pm_selector_marked_ct(textSelectorP) >= 0); reportAbsentGlyphs(wchar, fontP, textSelectorP, &missingCharCt); if (missingCharCt > 0) { + if (verbose) + pm_message("%u characters absent in font", missingCharCt); if (fixmode == QUIT) pm_error("aborting"); @@ -405,10 +405,14 @@ computeFont(struct CmdlineInfo const cmdline, else font2P = pbm_defaultfont2(cmdline.wchar ? "bdf" : "bdf"); - if (cmdline.verbose) + if (cmdline.verbose) { reportFont(font2P); + pm_message("%u code points found in text", + pm_selector_marked_ct(textSelectorP)); + } validateFont(cmdline.wchar, font2P, textSelectorP, fixmode, + cmdline.verbose, fontHasAllCharsP); *fontPP = font2P; |