Bug 707833

Summary: Incorrect bboxes for some Type3 fonts
Product: MuPDF Reporter: Jorj <jorj.x.mckie>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: benoit.pierre
Priority: P2    
Version: unspecified   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Jorj 2024-06-20 09:53:24 UTC
In the example PDF, character bboxes are incorrectly computed.
So XML output delivers wrong quad results for characters and hence lines.

HTML output however seems correct, in that line heights equal to the font size are calculated.

PyMuPDF issue https://github.com/pymupdf/PyMuPDF/issues/3600
File link: https://github.com/user-attachments/files/15911488/8989fa66-9bff-4f0c-9f05-37c8a393207e.pdf

Reproducer XML:  mutool draw -o test.xml -F stext test.pdf 1
Reproducer HTML: mutool draw -o test.html test.pdf 1

We have a workaround in PyMuPDF, which can recompute character bboxes based on font ascender / descender and span origin. So the user has a solution for now.