mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.18k stars 9.95k forks source link

Characters clipped in Chrome when rendering PDFs that use variable weight fonts #14941

Open mikecoulhs opened 2 years ago

mikecoulhs commented 2 years ago

Indesign was used to create the following PDFs.

The document uses the RedHatDisplay fonts from Google. Google provides two versions of the fonts, "variable weight" and "static". The first document was created with the "variable weight" font installed. The second document was created with the "static" fonts installed.

The first one renders with the individual characters incorrectly clipped, while the second one renders correctly.

Configuration:

Steps to reproduce the problem:

  1. Using the pdfjs online viewer, open both PDFs in chrome and compare. Notice the clipped characters in the first image.

indesign-test1.pdf: image

indesign-test2.pdf: image

The problem also appears to occur in Firefox 100.0.1 (64-bit) The problem does NOT appear to occur in Safari (Version 15.0 (15612.1.29.41.4, 15612))

calixteman commented 2 years ago

The bug has already been reported in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1756855

jrmuizel commented 2 years ago

I think this problem may also be happening on https://ontarioliberal.ca/wp-content/uploads/2022/05/Ontario-Liberal-Platform.pdf