Skip to content
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

Fix Postscript name in font to avoid bug when saving in pdf #13445

Merged
merged 1 commit into from May 27, 2021

Conversation

calixteman
Copy link
Contributor

@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.67.70.0:8877/20c6d4a1b436825/output.txt

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with passing tests; thank you!

@@ -722,6 +722,11 @@ function createPostTable(properties) {
); // maxMemType1
}

function makePostscriptName(name) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd probably call this createPostscriptName for improved consistency, since all of the surrounding functions use that pattern.

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/20c6d4a1b436825/output.txt

Total script time: 25.82 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/20c6d4a1b436825/reftest-analyzer.html#web=eq.log

  - for xfa rendering, fonts are loaded and used in html;
  - when printed and saved in pdf, on linux, Firefox uses cairo backend
  - when subsetting a font, cairo uses the font postscript name and when this one is empty that leads to a bug
    (the append at https://github.com/freedesktop/cairo/blob/63f0d6268469dcd12316ea405a026f4be900dd79/src/cairo-cff-subset.c#L2049 is failing because of null length)
  - so this patch adds a postscript name to the font to make cairo happy.
@calixteman calixteman merged commit f587d59 into mozilla:master May 27, 2021
@calixteman calixteman deleted the ps_name branch May 27, 2021 11:52
@timvandermeij timvandermeij removed the request for review from brendandahl May 28, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants