From ef6a789bd2d1541a871ca0afbb0f1fe4ee191dc3 Mon Sep 17 00:00:00 2001 From: Tifa <62847935+Tiphereth-A@users.noreply.github.com> Date: Thu, 16 May 2024 03:29:33 +0800 Subject: [PATCH] doc: Japanese support --- .github/workflows/release.yml | 8 +++++--- ICPCnotebook.cls | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a56fff7f..57cfe772d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,16 +70,18 @@ jobs: wget -q -O fira.zip "https://github.com/mozilla/Fira/archive/refs/tags/4.106.zip" wget -q -O firacode.zip "https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip" wget -q -O notosans.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip" - wget -q -O notosanscjk.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKsc-hinted.zip" + wget -q -O notosanscjksc.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKsc-hinted.zip" + wget -q -O notosanscjkjp.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" wget -q "https://mirror.math.princeton.edu/pub/CTAN/fonts/cm-unicode.zip" unzip -q fira.zip -d fira unzip -q firacode.zip -d firacode unzip -q notosans.zip -d notosans - unzip -q notosanscjk.zip -d notosanscjk + unzip -q notosanscjksc.zip -d notosanscjksc + unzip -q notosanscjkjp.zip -d notosanscjkjp unzip -q ./cm-unicode.zip for i in woff2 ttf; do cp -r fira/Fira-4.106/$i /usr/share/fonts/$i; done for i in woff2 ttf; do cp -r firacode/$i /usr/share/fonts/$i; done - cp -r notosans notosanscjk cm-unicode/fonts/otf/* /usr/share/fonts + cp -r notosans notosanscjksc notosanscjkjp cm-unicode/fonts/otf/* /usr/share/fonts fc-cache -f root_file: notebook.tex - name: Upload Artifacts diff --git a/ICPCnotebook.cls b/ICPCnotebook.cls index 9d3e1d84a..f51cec237 100644 --- a/ICPCnotebook.cls +++ b/ICPCnotebook.cls @@ -47,7 +47,9 @@ \setmathrm{CMU Serif} \setmathsf{CMU Sans Serif} \newfontfamily\cnfont{Noto Sans CJK SC} +\newfontfamily\jpfont{Noto Sans CJK JP} \setTransitionsForChinese{\begingroup\cnfont}{\endgroup} +\setTransitionsForJapanese{\begingroup\jpfont}{\endgroup} % User defined command \newcommand{\lcm}{\operatorname{lcm}}