From 854d45d2b6efa64a4c48d61c49de345c9e3b2ad2 Mon Sep 17 00:00:00 2001 From: "ryan.kuba" Date: Tue, 12 Jul 2022 13:21:15 -0400 Subject: [PATCH 1/2] KASM-2917 setup a default font profile to prefer noto fonts --- src/ubuntu/install/chromium/fonts.conf | 523 ++++++++++++++++++ .../install/chromium/install_chromium.sh | 6 +- 2 files changed, 528 insertions(+), 1 deletion(-) create mode 100644 src/ubuntu/install/chromium/fonts.conf diff --git a/src/ubuntu/install/chromium/fonts.conf b/src/ubuntu/install/chromium/fonts.conf new file mode 100644 index 0000000..fb21282 --- /dev/null +++ b/src/ubuntu/install/chromium/fonts.conf @@ -0,0 +1,523 @@ + + + + + + serif + + PT Serif + + + + + + sans-serif + + Roboto + + + + + + monospace + + Cascadia Code PL + + + + + + system-ui + + Roboto + + + + + + + + + + serif + + + Noto Serif CJK SC + + + + + + + + ja + + + serif + + + Noto Serif CJK JP + + + + + + + + ko + + + serif + + + Noto Serif CJK KR + + + + + + + + zh + + + serif + + + Noto Serif CJK SC + + + + + + zh-hans + + + serif + + + Noto Serif CJK SC + + + + + + zh-hant + + + serif + + + Noto Serif CJK TC + + + + + + + zh-cn + + + serif + + + Noto Serif CJK SC + + + + + + zh-tw + + + serif + + + Noto Serif CJK TC + + + + + + + + + + sans-serif + + + Noto Sans CJK SC + + + + + + + + ja + + + sans-serif + + + Noto Sans CJK JP + + + + + + + + ko + + + sans-serif + + + Noto Sans CJK KR + + + + + + + + zh + + + sans-serif + + + Noto Sans CJK SC + + + + + + zh-hans + + + sans-serif + + + Noto Sans CJK SC + + + + + + zh-hant + + + sans-serif + + + Noto Sans CJK TC + + + + + + zh-hant-hk + + + sans-serif + + + Noto Sans CJK HK + + + + + + + zh-cn + + + sans-serif + + + Noto Sans CJK SC + + + + + + zh-tw + + + sans-serif + + + Noto Sans CJK TC + + + + + + zh-hk + + + sans-serif + + + Noto Sans CJK HK + + + + + + + + + + monospace + + + Noto Sans Mono CJK SC + + + + + + + + ja + + + monospace + + + Noto Sans Mono CJK JP + + + + + + + + ko + + + monospace + + + Noto Sans Mono CJK KR + + + + + + + + zh + + + monospace + + + Noto Sans Mono CJK SC + + + + + + zh-hans + + + monospace + + + Noto Sans Mono CJK SC + + + + + + zh-hant + + + monospace + + + Noto Sans Mono CJK TC + + + + + + zh-hant-hk + + + monospace + + + Noto Sans Mono CJK HK + + + + + + + zh-cn + + + monospace + + + Noto Sans Mono CJK SC + + + + + + zh-tw + + + monospace + + + Noto Sans Mono CJK TC + + + + + + zh-hk + + + monospace + + + Noto Sans Mono CJK HK + + + + + + + + + + system-ui + + + Noto Sans CJK SC + + + + + + + + ja + + + system-ui + + + Noto Sans CJK JP + + + + + + + + ko + + + system-ui + + + Noto Sans CJK KR + + + + + + + + zh + + + system-ui + + + Noto Sans CJK SC + + + + + + zh-hans + + + system-ui + + + Noto Sans CJK SC + + + + + + zh-hant + + + system-ui + + + Noto Sans CJK TC + + + + + + zh-hant-hk + + + system-ui + + + Noto Sans CJK HK + + + + + + + zh-cn + + + system-ui + + + Noto Sans CJK SC + + + + + + zh-tw + + + system-ui + + + Noto Sans CJK TC + + + + + + zh-hk + + + system-ui + + + Noto Sans CJK HK + + + diff --git a/src/ubuntu/install/chromium/install_chromium.sh b/src/ubuntu/install/chromium/install_chromium.sh index 8268333..5b67246 100644 --- a/src/ubuntu/install/chromium/install_chromium.sh +++ b/src/ubuntu/install/chromium/install_chromium.sh @@ -17,9 +17,13 @@ elif [ "${DISTRO}" == "opensuse" ]; then zypper clean --all else apt-get update - apt-get install -y software-properties-common + apt-get install -y software-properties-common fonts-noto-cjk apt-get remove -y chromium-browser-l10n chromium-codecs-ffmpeg chromium-browser + # Font config + mkdir -p /home/kasm-default-profile/.config/fontconfig + cp /dockerstartup/install/chromium/fonts.conf /home/kasm-default-profile/.config/fontconfig/ + # Chromium on Ubuntu 19.10 or newer uses snap to install which is not # currently compatible with docker containers. The new install will pull # deb files from archive.ubuntu.com for ubuntu 18.04 and install them. From 94e456559e9bc54548781ac3fb8a52b590d0c0d5 Mon Sep 17 00:00:00 2001 From: "ryan.kuba" Date: Wed, 13 Jul 2022 12:44:53 -0400 Subject: [PATCH 2/2] KASM-2917 use mscorefonts that do not require configuration --- src/ubuntu/install/chromium/fonts.conf | 523 ------------------ .../install/chromium/install_chromium.sh | 6 +- 2 files changed, 1 insertion(+), 528 deletions(-) delete mode 100644 src/ubuntu/install/chromium/fonts.conf diff --git a/src/ubuntu/install/chromium/fonts.conf b/src/ubuntu/install/chromium/fonts.conf deleted file mode 100644 index fb21282..0000000 --- a/src/ubuntu/install/chromium/fonts.conf +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - serif - - PT Serif - - - - - - sans-serif - - Roboto - - - - - - monospace - - Cascadia Code PL - - - - - - system-ui - - Roboto - - - - - - - - - - serif - - - Noto Serif CJK SC - - - - - - - - ja - - - serif - - - Noto Serif CJK JP - - - - - - - - ko - - - serif - - - Noto Serif CJK KR - - - - - - - - zh - - - serif - - - Noto Serif CJK SC - - - - - - zh-hans - - - serif - - - Noto Serif CJK SC - - - - - - zh-hant - - - serif - - - Noto Serif CJK TC - - - - - - - zh-cn - - - serif - - - Noto Serif CJK SC - - - - - - zh-tw - - - serif - - - Noto Serif CJK TC - - - - - - - - - - sans-serif - - - Noto Sans CJK SC - - - - - - - - ja - - - sans-serif - - - Noto Sans CJK JP - - - - - - - - ko - - - sans-serif - - - Noto Sans CJK KR - - - - - - - - zh - - - sans-serif - - - Noto Sans CJK SC - - - - - - zh-hans - - - sans-serif - - - Noto Sans CJK SC - - - - - - zh-hant - - - sans-serif - - - Noto Sans CJK TC - - - - - - zh-hant-hk - - - sans-serif - - - Noto Sans CJK HK - - - - - - - zh-cn - - - sans-serif - - - Noto Sans CJK SC - - - - - - zh-tw - - - sans-serif - - - Noto Sans CJK TC - - - - - - zh-hk - - - sans-serif - - - Noto Sans CJK HK - - - - - - - - - - monospace - - - Noto Sans Mono CJK SC - - - - - - - - ja - - - monospace - - - Noto Sans Mono CJK JP - - - - - - - - ko - - - monospace - - - Noto Sans Mono CJK KR - - - - - - - - zh - - - monospace - - - Noto Sans Mono CJK SC - - - - - - zh-hans - - - monospace - - - Noto Sans Mono CJK SC - - - - - - zh-hant - - - monospace - - - Noto Sans Mono CJK TC - - - - - - zh-hant-hk - - - monospace - - - Noto Sans Mono CJK HK - - - - - - - zh-cn - - - monospace - - - Noto Sans Mono CJK SC - - - - - - zh-tw - - - monospace - - - Noto Sans Mono CJK TC - - - - - - zh-hk - - - monospace - - - Noto Sans Mono CJK HK - - - - - - - - - - system-ui - - - Noto Sans CJK SC - - - - - - - - ja - - - system-ui - - - Noto Sans CJK JP - - - - - - - - ko - - - system-ui - - - Noto Sans CJK KR - - - - - - - - zh - - - system-ui - - - Noto Sans CJK SC - - - - - - zh-hans - - - system-ui - - - Noto Sans CJK SC - - - - - - zh-hant - - - system-ui - - - Noto Sans CJK TC - - - - - - zh-hant-hk - - - system-ui - - - Noto Sans CJK HK - - - - - - - zh-cn - - - system-ui - - - Noto Sans CJK SC - - - - - - zh-tw - - - system-ui - - - Noto Sans CJK TC - - - - - - zh-hk - - - system-ui - - - Noto Sans CJK HK - - - diff --git a/src/ubuntu/install/chromium/install_chromium.sh b/src/ubuntu/install/chromium/install_chromium.sh index 5b67246..1f49f15 100644 --- a/src/ubuntu/install/chromium/install_chromium.sh +++ b/src/ubuntu/install/chromium/install_chromium.sh @@ -17,13 +17,9 @@ elif [ "${DISTRO}" == "opensuse" ]; then zypper clean --all else apt-get update - apt-get install -y software-properties-common fonts-noto-cjk + apt-get install -y software-properties-common ttf-mscorefonts-installer apt-get remove -y chromium-browser-l10n chromium-codecs-ffmpeg chromium-browser - # Font config - mkdir -p /home/kasm-default-profile/.config/fontconfig - cp /dockerstartup/install/chromium/fonts.conf /home/kasm-default-profile/.config/fontconfig/ - # Chromium on Ubuntu 19.10 or newer uses snap to install which is not # currently compatible with docker containers. The new install will pull # deb files from archive.ubuntu.com for ubuntu 18.04 and install them.