-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
XFA - Add Liberation-Sans font as a substitution for some missing fonts #13517
Conversation
calixteman
commented
Jun 8, 2021
- Some js files contain scale factors for each glyph in order to rescale Liberation to have a final font with the correct width.
- A lot of XFA have some containers where their dimensions are based on their text content, so using default font from browser can lead to an almost unreadable pdf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few refactors below. We'll probably want to do a bit more in some follow ups to avoid confusing these XFA fonts with the PDF standard 14 fonts.
- a lot of xfa files are using Myriad pro or Arial fonts without embedding them and some containers have some dimensions based on those font metrics. So not having the exact same font leads to a wrong display. - since it's pretty hard to find a replacement font with the exact same metrics, this patch gives the possibility to read glyf table, rescale each glyph and then write a new table. - so once PR mozilla#12726 is merged we could rescale for example Helvetica to replace Myriad Pro.
066f395
to
76bb0b1
Compare
- Some js files contain scale factors for each glyph in order to rescale Liberation to have a final font with the correct width. - A lot of XFA have some containers where their dimensions are based on their text content, so using default font from browser can lead to an almost unreadable pdf.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/bb1af93e77ce4b0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 2 Live output at: http://3.101.106.178:8877/f9f3dbd6a42c5ac/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/bb1af93e77ce4b0/output.txt Total script time: 26.84 mins
Image differences available at: http://54.67.70.0:8877/bb1af93e77ce4b0/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/f9f3dbd6a42c5ac/output.txt Total script time: 30.25 mins
Image differences available at: http://3.101.106.178:8877/f9f3dbd6a42c5ac/reftest-analyzer.html#web=eq.log |
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a5fce4182dc28f6/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @calixteman received. Current queue size: 1 Live output at: http://3.101.106.178:8877/adcf854c313fb29/output.txt |
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/adcf854c313fb29/output.txt Total script time: 27.62 mins
|
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/a5fce4182dc28f6/output.txt Total script time: 60.00 mins
|
/botio-linux makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/f02f326a9da399d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/f02f326a9da399d/output.txt Total script time: 23.44 mins
|