Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !736

Merged
Created Apr 20, 2020 by Jérome Perrin@jeromeOwner

Fix fonts for firefox >= 60 in selenium

  • Overview 4
  • Commits 3
  • Pipelines 2
  • Changes 9

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

now it looks like this:

screenshot_test.TestFirefox60.test_screenshot_after

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.

Edited Apr 21, 2020 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/selenium_font
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7