-
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
Unable to render font family #14330
Comments
This part of the ISSUE_TEMPLATE is always required in order for any issue to be actionable.
While it's somewhat difficult to tell from the description, it sounds like this is maybe related to a custom implementation; hence please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):
|
Please note that it's also quite difficult to assist with an upgrade from a PDF.js version that's almost four years old, and that Given the lack of details it's difficult to tell, but if I were to guess you might have been utilizing the fonts (as parsed by the PDF.js library) in a non-intended and thus unsupported way. Please keep in mind that rendering and text-extraction uses different code-paths in PDF documents, and we've never supported using the font-files themselves for e.g. text-selection purposes. All-in-all, closing as INCOMPLETE for now since we cannot help given the currently provided information. |
@Snuffleupagus sorry for the incomplete details of my issue. Basically, I was planning to update my project dependencies. In 2.0.274 I was able to display fontFaces of each text layer by just adding the textItem.fontName to its font-family rule in styles (as shown in my initial screenshots). e.g. font-family: g_d0_f1, sans-serif;. But in 2.10.377 its not rendering the fontFace. |
Attach (recommended) or Link to PDF file here:
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
2.0.274 renders texts based on font-family styles
What went wrong? (add screenshot)
2.10.377 always use fallback font family
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: