Commit 301240f2 authored by Jérome Perrin's avatar Jérome Perrin

software/seleniumserver,seleniumrunner: workaround firefox >= 60 font issue

This makes firefox 60 and 68 able to load some fonts and fixes the issue
that fonts were rendered as garbled text
parent ba527b82
...@@ -162,7 +162,8 @@ install = ...@@ -162,7 +162,8 @@ install =
url, md5sum = options[guessPlatform()].split() url, md5sum = options[guessPlatform()].split()
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location) self.copyTree(guessworkdir(extract_dir), location)
${:post-install}
post-install =
[geckodriver] [geckodriver]
# Current geckodriver installed as ${buildout:bin-directory}/geckodriver # Current geckodriver installed as ${buildout:bin-directory}/geckodriver
......
...@@ -11,6 +11,7 @@ extends = ...@@ -11,6 +11,7 @@ extends =
../../component/firefox/buildout.cfg ../../component/firefox/buildout.cfg
../../component/ffmpeg/buildout.cfg ../../component/ffmpeg/buildout.cfg
../../component/coreutils/buildout.cfg ../../component/coreutils/buildout.cfg
../../component/fonts/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
./buildout.hash.cfg ./buildout.hash.cfg
...@@ -22,6 +23,27 @@ parts = ...@@ -22,6 +23,27 @@ parts =
firefox-wrapper firefox-wrapper
geckodriver geckodriver
# XXX firefox 68 does not seem to honor <dir> from fontconfig's
# fonts.conf and only loads from system locations and from the
# fonts folder located in firefox part, so we copy (actually, symlink)
# some fonts there, otherwise firefox cannot find its standard fonts.
[symlink-extra-fonts-to-firefox-fonts-dir]
extra-fonts =
${android-fonts:location}
${dejavu-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
install =
import os
for extra_font_dir in '''${:extra-fonts}'''.splitlines():
dst = os.path.join(location, 'fonts', os.path.basename(extra_font_dir))
os.symlink(extra_font_dir, dst)
[firefox]
post-install =
${symlink-extra-fonts-to-firefox-fonts-dir:install}
[macro-template] [macro-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
...@@ -44,6 +44,33 @@ output = ${buildout:directory}/template.cfg ...@@ -44,6 +44,33 @@ output = ${buildout:directory}/template.cfg
<= macro-template <= macro-template
output = ${buildout:directory}/template-selenium.cfg output = ${buildout:directory}/template-selenium.cfg
# XXX firefox 62 and firefox 68 does not seem to honor <dir> from
# fonts.conf and only loads from system locations and from the fonts
# folder located in firefox part, so we copy (actually, symlink) some
# fonts there, otherwise firefox cannot find its standard fonts.
[symlink-extra-fonts-to-firefox-fonts-dir]
extra-fonts =
${android-fonts:location}
${dejavu-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
install =
import os
for extra_font_dir in '''${:extra-fonts}'''.splitlines():
dst = os.path.join(location, 'fonts', os.path.basename(extra_font_dir))
os.symlink(extra_font_dir, dst)
[firefox-60]
post-install =
${symlink-extra-fonts-to-firefox-fonts-dir:install}
[firefox-68]
post-install =
${symlink-extra-fonts-to-firefox-fonts-dir:install}
[versions] [versions]
plone.recipe.command = 1.1 plone.recipe.command = 1.1
slapos.recipe.template = 4.4 slapos.recipe.template = 4.4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment