-
Notifications
You must be signed in to change notification settings - Fork 10k
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 font glyphs use_system_font=false but standard fonts are available in some PDFs - possibly specific to composite font with embedded cmap #17675
Comments
Please note that the Lines 150 to 154 in a83a8d7
Hence it's not entirely clear to me if we want to try and "fix" this, for the following reasons:
|
Got it thanks for your reply. I was having an issue where some users were not able to render PDFs due to a couple of examples:
So as part of making sure PDFs are rendered properly for all users, I was thinking to include standard fonts as defensive compat layer. That being said, if I were using node.js to render, then the case above would render as the second screenshot. I've gone a bit into the pdfjs code so I can 100% appreciate your comment that fixes to fonts can be very finnicky and lead to regressions. I've also tried various strategies to inspect PDF to identify whether they will have rendering issues ahead of time. |
btw. this looks like: #16711 |
It seems that the this PR: #14025 improves the glyph mapping but only when as part of the routine that does fallback to system font. Does it make sense to be robust to this error for the case where we are shipping the 14 standard fonts?
I have had (non-deterministic) issues with some users falling back to system font in other instances so I'm exploring making use_system_font=false by default in my application (which uses pdf.js in the browser). However, I am worried about the risk of being exposed to this issue in cases where the CMAP is incorrect.
Attach (recommended) or Link to PDF file here: This PDF: https://github.com/mozilla/pdf.js/blob/master/test/pdfs/issue11915.pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
The text was updated successfully, but these errors were encountered: