为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

PDF Text Clipping

  • 8 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 michael489

more options

I have two PDFs that I designed and uploaded to our website, but the headline in both displays with clipped characters in Firefox. Different fonts were used in both and the issue is the same. I even tried adding more tracking then re-uploading, the issue persists.

I checked in other browsers and the text displays as intended. The attached screenshots show the issue in Firefox, compared to how it should look (viewed in Chrome).

It's only this one line of text that is affected and I don't know why.

I have two PDFs that I designed and uploaded to our website, but the headline in both displays with clipped characters in Firefox. Different fonts were used in both and the issue is the same. I even tried adding more tracking then re-uploading, the issue persists. I checked in other browsers and the text displays as intended. The attached screenshots show the issue in Firefox, compared to how it should look (viewed in Chrome). It's only this one line of text that is affected and I don't know why.
已附加屏幕截图

由bg-design于修改

被采纳的解决方案

I got to the bottom of the issue: variable weight fonts.

I normally avoid installing them, for this exact reason, but I must have overlooked when I installed these two.

I just deleted the variable weight versions and installed the static fonts instead. Issue fixed.

定位到答案原位置 👍 0

所有回复 (8)

more options

Firefox's PDF viewer reconstructs the PDF as an HTML document and writes the text to an HTML canvas. Sometimes there are problems with unusual fonts, but I can't tell whether that is the issue in this case.

To try to isolate a program problem vs. a setting/add-on/data problem:

New Profile Test

This takes about 3 minutes, plus the time to test your document.

Inside Firefox, type or paste about:profiles in the address bar and press Enter/Return to load it.

Take a quick glance at the page and make a mental note of which Profile has this notation: This is the profile in use and it cannot be deleted. That is your current default profile.

Click the "Create a New Profile" button, then click Next. Assign a name like Feb2022, ignore the option to relocate the profile folder, and click the Finish button.

Firefox will switch your default profile to the new one, so click the Set as Default Profile button for your regular one to avoid an unwanted surprise at your next startup.

Scroll down to Feb2022 and click its Launch profile in new browser button.

Firefox should open a new window that looks like a brand new, uncustomized installation. (Your existing Firefox window(s) should not be affected.) Please ignore any tabs enticing you to connect to a Sync account or to activate extensions found on your system to get a clean test.

Does the document render any differently in the new profile?

When you are done with the experiment, you can close the extra window without affecting your regular Firefox profile. (Feb2022 will remain available for future testing.)

more options

Hey @jscher2000,

I just tried your test and the issue persists.

The two fonts in question are Spartan and Oswald, both of which are Google fonts I've used extensively without issue. The fonts are both used throughout the document with no issue, it's just this one area in both my PDFs that have this clipping.

I've tried deleting the text and retyping it by hand, applying styles manually rather than from my InDesign paragraph styles but it still clips.

more options

Hi, can you create a new issue with attached exemplary PDF file on https://github.com/mozilla/pdf.js/issues ? Thanks.

more options

Do you notice any pattern of problems with bold vs. normal weight text?

more options

选择的解决方案

I got to the bottom of the issue: variable weight fonts.

I normally avoid installing them, for this exact reason, but I must have overlooked when I installed these two.

I just deleted the variable weight versions and installed the static fonts instead. Issue fixed.

more options

I'm not sure that has been filed as an issue, so if you think it's a kind of font that will gain increasing use, it might be worth submitting one.

more options

I'm not sure about the popularity of Spartan, but Oswald is very widely used. Google began rolling out the variable weight versions of their fonts...I'm not exactly sure, but I believe sometime in the past year or two, so this could become a bigger issue since they default to variable weight versions when you download many of their fonts now.

I'll submit an issue about variable fonts in general.

Thanks for the help; your tip about font weight is what got me thinking.

more options

I've opened a ticket which demonstrates the issue when rendering variable weight fonts - this looks to be the same issue being discussed here.

https://github.com/mozilla/pdf.js/issues/14941