Bug 697973 - Add user callbacks for logging fz_warn and fz_throw error messages.
Summary: Add user callbacks for logging fz_warn and fz_throw error messages.
Status: RESOLVED DUPLICATE of bug 701263
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: All All
: P4 enhancement
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-31 13:37 UTC by Petr Kurtin
Modified: 2021-02-04 12:22 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Bug Report: Similar Warning Message to Bug 697973: font.c:63: not building glyph bbox table for font ‘IPAexMincho’ with 5678 glyphs (680 bytes, text/plain)
2019-02-28 03:14 UTC, Hiroshi Sekiguchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Kurtin 2017-05-31 13:37:47 UTC
Is it possible to control verbose level of debug logging? They are enabled by default. When I build a console application I see these warnings/errors in my output and it's quite "hard" to disable logging from source code:
---
warning: not building glyph bbox table for font 'ABCDEE+Calibri' with 6442 glyphs
error: cannot recognize version marker
warning: trying to repair broken xref
warning: repairing PDF document
error: no objects found
warning: not building glyph bbox table for font 'BEFXFK+ArialMT' with 4103 glyphs
warning: not building glyph bbox table for font 'ABCDEE+Cambria' with 6991 glyphs
etc.
---

in source code it' hardcoded in:
- fz_flush_warnings (fprintf)
- fz_warn
- throw (fprintf)
- fz_fake_throw
- fz_vthrow
etc.

in context.h, fz_warn should be defined as "((void)0)".

Petr
Comment 1 Robin Watts 2017-06-01 03:53:06 UTC
This is the kind of thing we'd undertake for a supported or commercial customer. Are Avast looking at using MuPDF in a product?

Otherwise, you are of course free to make any changes to the code you want. If you care to submit a patch, (or at least a more detailed suggestion) we'd consider it.
Comment 2 Hiroshi Sekiguchi 2019-02-28 03:14:05 UTC
Created attachment 17011 [details]
Bug Report: Similar Warning Message to Bug 697973: font.c:63: not building glyph bbox table for font ‘IPAexMincho’ with 5678 glyphs
Comment 3 Tor Andersson 2021-02-04 12:22:39 UTC

*** This bug has been marked as a duplicate of bug 701263 ***