Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect text positions for some font #3780

Open
JorjMcKie opened this issue Aug 14, 2024 · 3 comments
Open

Incorrect text positions for some font #3780

JorjMcKie opened this issue Aug 14, 2024 · 3 comments
Labels
enhancement upstream bug bug outside this package

Comments

@JorjMcKie
Copy link
Collaborator

Description of the bug

The attached PDF page uses a font which ascender value is incorrectly determined by MuPDF.
Basis of this post is Discussions post #3772.

How to reproduce the bug

The revealing command is mutool draw -o test.xml -F stext test.pdf.
test.pdf

The problematic font is "AdvOT144a03c1" (embedded subset).
Note that this error happens in MuPDF, not PyMuPDF. So we assign the label "upstream bug".
However, PyMuPDF's Page method get_text("dict") does not correctly repair the computation when setting TOOLS.set_small_glyph_heights(True). So we also assign the label (PyMuPDF) "enhancement".

PyMuPDF version

1.24.9

Operating system

Windows

Python version

3.12

@JorjMcKie JorjMcKie added enhancement upstream bug bug outside this package labels Aug 14, 2024
@JorjMcKie
Copy link
Collaborator Author

@sebras
Copy link
Contributor

sebras commented Sep 27, 2024

@JorjMcKie This has been fixed upstream, can can be marked "fix developed", right?

@julian-smith-artifex-com
Copy link
Collaborator

This issue also needs a fix to PyMuPDF itself which i don't think has been done yet, so fix developed shouldn't be used yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement upstream bug bug outside this package
Projects
None yet
Development

No branches or pull requests

3 participants