mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-10 02:22:57 +01:00
feat: Proper Emoji support in Chrome images
We often have flaky tests around emoji rendering. Maybe we can improve the test quality by adding a proper emoji font. The existing install-noto-image script wasn't utilized and could be simplified anyhow. Furthermore I think it is fine to install the font when Chrome is installed, given that we use the Chrome images for integration tests with the browser.
This commit is contained in:
parent
cc548a28af
commit
51cdfcf732
2 changed files with 21 additions and 52 deletions
|
|
@ -3,6 +3,14 @@
|
|||
set -xeuo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
function download_noto() {
|
||||
local NOTO_VERSION
|
||||
# https://github.com/googlefonts/noto-emoji/releases/tag/v2.038
|
||||
NOTO_VERSION="v2.038"
|
||||
curl --silent -O --location --fail "https://github.com/googlefonts/noto-emoji/raw/${NOTO_VERSION}/fonts/NotoColorEmoji.ttf"
|
||||
echo "NotoColorEmoji.ttf"
|
||||
}
|
||||
|
||||
function download_deb() {
|
||||
component=$1
|
||||
|
||||
|
|
@ -44,6 +52,19 @@ function build_debian() {
|
|||
rm -f "$DRIVER_DEB"
|
||||
fi
|
||||
|
||||
# We have loads of tests rendering emoji, so let's ensure a proper emoji font is installed
|
||||
echo "Installing Noto emoji font"
|
||||
FONT_FILE=$(download_noto)
|
||||
|
||||
mkdir -p /usr/local/share/fonts
|
||||
mv "$FONT_FILE" /usr/local/share/fonts/
|
||||
chmod 644 "/usr/local/share/fonts/${FONT_FILE}"
|
||||
ls -la /usr/local/share/fonts/
|
||||
|
||||
fc-cache -fv
|
||||
fc-match -s noto
|
||||
|
||||
# Cleanup
|
||||
apt-get autoremove -yq
|
||||
apt-get clean -yqq
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue