Bug 697973

Summary: Add user callbacks for logging fz_warn and fz_throw error messages.
Product: MuPDF Reporter: Petr Kurtin <kurtin>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: robin.watts, sekigh8111a
Priority: P4    
Version: unspecified   
Hardware: All   
OS: All   
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

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