when blocking document fonts, exempt PDFs
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
People
(Reporter: thorin, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
- make sure
browser.display.use_document_fonts
=1
(default: allowed) - open: https://www.nato.int/docu/presskit/010219/004gb.pdf
- result: pdf text content displays fine
- set
browser.display.use_document_fonts
=0
(disallow) - reload the test
- result: pdf is missing text, console warnings abound (see below)
- Note: the problem does not occur with all PDFs
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet Times_path_U.". pdf.js:523:13
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet Times_path_N.". pdf.js:523:13
etc
This pref is the setting under General>Language and Appearance>Fonts & Colors>Advanced>Allow pages to choose...
I wouldn't necessarily call a PDF a (web) "page" - and for fingerprinting purposes (which is what the pref can be used for: I don't know what the original "intent" of the pref was), a PDF can't exactly enumerate fonts and exfil that data (AFAIK, but IANAE): so I think we could exempt them
Personally, I don't mind: if I see this, I just flick open a secondary Firefox which is more relaxed, but if it makes sense to reduce breakage, then by all means
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
If I understand it correctly, the principal is currently resource://
Also: here's a PDF (from the same site) that does render text when document fonts are blocked
Comment 2•5 years ago
|
||
The difference hinges on whether the fonts were embedded in the PDF. Text using an embedded font is rendered to the canvas; text using a non-embedded built-in font (or webfont, presumably) is not.
Apparently a workaround was introduced in Firefox 24 to address this interaction in bug 738627 and https://github.com/mozilla/pdf.js/pull/3195 so I'm not sure why the issue has reemerged.
Comment 4•3 years ago
|
||
I can also see this issue with Debian's firefox 95.0.1-1 package.
https://www.dgdr.cnrs.fr/achats/agence/fichiers/Bonnes%20pratiques-Marche-Voyages-hebergement.pdf is also affected.
Comment 5•3 years ago
|
||
Dup of bug 1563678?
Vincent, is the issue in comment 4 that text is missing ? (if so, which text element is missing?), or do you mean that it looks different?
I would also think, this is a duplicate of 1563678.
Comment 7•3 years ago
|
||
I don't see text missing. But the spacing between characters is bad and the characters are shifted to the right compared to the background in text selection.
Description
•