Bug 707833 - Incorrect bboxes for some Type3 fonts
Summary: Incorrect bboxes for some Type3 fonts
Status: UNCONFIRMED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 09:53 UTC by Jorj
Modified: 2024-06-26 14:44 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.