Repository navigation
Account for the Firefox font size quantization in the text layer - #21810
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21810 +/- ##
=======================================
Coverage 90.18% 90.19%
=======================================
Files 264 264
Lines 67312 67320 +8
=======================================
+ Hits 60707 60720 +13
+ Misses 6605 6600 -5
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Harness. π New features to boost your workflow:
|
8f6f3ed to
cb79d37
Compare
|
/botio browsertest |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/31dfc3b1d7e65f1/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/4e301653b974ed6/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/31dfc3b1d7e65f1/output.txt Total script time: 18.92 mins
Image differences available at: http://54.241.84.105:8877/31dfc3b1d7e65f1/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/4e301653b974ed6/output.txt Total script time: 23.77 mins
Image differences available at: http://54.193.163.58:8877/4e301653b974ed6/reftest-analyzer.html#web=eq.log |
|
The diff are expected. |
|
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/d0ff812ccec0985/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/e53356f25b90a8a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/d0ff812ccec0985/output.txt Total script time: 19.02 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/e53356f25b90a8a/output.txt Total script time: 24.23 mins
|
Firefox rounds the font size set on a canvas 2d context, once divided by the device pixel ratio, to 7 bits of precision. Hence
measureTextcan return a width up to ~1% off the one the spans are laid out with, which made--scale-xslightly wrong in a zoom dependent way. Measure with a size left untouched by that rounding and rescale the returned width, which is linear in the font size.