Fix fonts for firefox >= 60 in selenium
As we can see in the testcases added, since we started to use Firefox 60, fonts were no longer selected and some garbage characters were displayed instead of the text. Before these changes, it looked like this: ![screenshot_test.TestFirefox60.test_screenshot_before](/uploads/7ffe2eb7678b9f62ae13a56f4c8b57cf/screenshot_test.TestFirefox60.test_screenshot_before.png) now it looks like this: ![screenshot_test.TestFirefox60.test_screenshot_after](/uploads/6d178ebdac388e534206149e97de08a1/screenshot_test.TestFirefox60.test_screenshot_after.png) which is of course better, but still wrong, because the test case uses Arial and this font is not Arial. This part will be fixed later. It seems firefox no longer accepts fonts from slapos directories, before the fix, firefox prints this on console: (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.942: failed to create cairo scaled font, expect ugly output. the offending font is 'IPAGothic 9.9990234375' (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.942: font_face status is: file not found (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.942: scaled_font status is: file not found (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.942: shaping failure, expect ugly output. shape-engine='PangoFcShapeEngine', font='IPAGothic 9.9990234375', text='?' (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.943: failed to create cairo scaled font, expect ugly output. the offending font is 'IPAGothic 9.9990234375' (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.943: font_face status is: file not found (./parts/firefox-60/firefox:7277): Pango-WARNING **: 08:06:33.943: scaled_font status is: file not found but the file exists... Maybe this is a bug in firefox ( https://bugzilla.mozilla.org/show_bug.cgi?id=1336049#c2 looks similar, even though for us in firefox 52 it was fine and the problem appeared between 52 and 60). A simple workaround is to copy all fonts in firefox fonts' directory. See merge request !736
Showing
11.2 KB
7.77 KB
7.77 KB
11.3 KB