-
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
XFA - Fix text positions (bug 1718741) #13705
Conversation
calixteman
commented
Jul 9, 2021
- font line height is taken into account by acrobat when it isn't with masterpdfeditor: I extracted a font from a pdf, modified some ascent/descent properties thanks to ttx and the reinjected the font in the pdf: only Acrobat is taken it into account. So in this patch, line heights for some substituted fonts are added.
- it seems that Acrobat is using a line height of 1.2 when the line height in the font is not enough (it's the only way I found to fix correctly bug 1718741).
- don't use flex in wrapper container (which was causing an horizontal overflow in the above bug).
- consequently, the above fixes introduced a lot of small regressions, so in order to see real improvements on reftests, I fixed the regressions in this patch:
- replace margin by padding in some case where padding is a part of a container dimensions;
- remove some flex display: some containers are wrongly sized when rendered;
- set letter-spacing to 0.01px: it helps to be sure that text is not broken because of not enough width in Firefox.
Almost all the reftests are broken: I checked locally all of them and overall it's an improvement, I compared a lot of output with Acrobat and for most of them we've very close rendering. /botio test |
- font line height is taken into account by acrobat when it isn't with masterpdfeditor: I extracted a font from a pdf, modified some ascent/descent properties thanks to ttx and the reinjected the font in the pdf: only Acrobat is taken it into account. So in this patch, line heights for some substituted fonts are added. - it seems that Acrobat is using a line height of 1.2 when the line height in the font is not enough (it's the only way I found to fix correctly bug 1718741). - don't use flex in wrapper container (which was causing an horizontal overflow in the above bug). - consequently, the above fixes introduced a lot of small regressions, so in order to see real improvements on reftests, I fixed the regressions in this patch: - replace margin by padding in some case where padding is a part of a container dimensions; - remove some flex display: some containers are wrongly sized when rendered; - set letter-spacing to 0.01px: it helps to be sure that text is not broken because of not enough width in Firefox.
/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/976360880962879/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://3.101.106.178:8877/d2408edec9e8e39/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/976360880962879/output.txt Total script time: 31.70 mins
Image differences available at: http://54.67.70.0:8877/976360880962879/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/d2408edec9e8e39/output.txt Total script time: 36.01 mins
Image differences available at: http://3.101.106.178:8877/d2408edec9e8e39/reftest-analyzer.html#web=eq.log |
A few observations:
|
about:
Since we've an overall improvement, I'd prefer fixing the 2 small regressions in a follow-up: it'd make my life easier. |
WFM, can you file bugs for the regressions? |
/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/095ff6109104529/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/2cd4550bf418a68/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/095ff6109104529/output.txt Total script time: 28.69 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/2cd4550bf418a68/output.txt Total script time: 33.61 mins
|