diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 174e5714e6..b2ee29ef96 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 25 18:44:07 UTC 2025 - David Diaz + +- Add fonts for CJK characters and monospaced text + (gh#agama-project/agama#2076, bsc#1237457). + ------------------------------------------------------------------- Tue Feb 25 15:57:49 UTC 2025 - Ancor Gonzalez Sosa diff --git a/web/src/assets/styles/fonts/NotoSansJP-VariableFont_wght.ttf b/web/src/assets/styles/fonts/NotoSansJP-VariableFont_wght.ttf new file mode 100644 index 0000000000..53b5ec5888 Binary files /dev/null and b/web/src/assets/styles/fonts/NotoSansJP-VariableFont_wght.ttf differ diff --git a/web/src/assets/styles/fonts/NotoSansKR-VariableFont_wght.ttf b/web/src/assets/styles/fonts/NotoSansKR-VariableFont_wght.ttf new file mode 100644 index 0000000000..57016c27f9 Binary files /dev/null and b/web/src/assets/styles/fonts/NotoSansKR-VariableFont_wght.ttf differ diff --git a/web/src/assets/styles/fonts/NotoSansSC-VariableFont_wght.ttf b/web/src/assets/styles/fonts/NotoSansSC-VariableFont_wght.ttf new file mode 100644 index 0000000000..4e0c62e278 Binary files /dev/null and b/web/src/assets/styles/fonts/NotoSansSC-VariableFont_wght.ttf differ diff --git a/web/src/assets/styles/fonts/RobotoMono-VariableFont_wght.ttf b/web/src/assets/styles/fonts/RobotoMono-VariableFont_wght.ttf new file mode 100644 index 0000000000..fc02de43ec Binary files /dev/null and b/web/src/assets/styles/fonts/RobotoMono-VariableFont_wght.ttf differ diff --git a/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff b/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff deleted file mode 100644 index 379f9ae197..0000000000 Binary files a/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff and /dev/null differ diff --git a/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2 b/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2 deleted file mode 100644 index 6392246675..0000000000 Binary files a/web/src/assets/styles/fonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2 and /dev/null differ diff --git a/web/src/assets/styles/index.scss b/web/src/assets/styles/index.scss index 4215166d86..176648a1a8 100644 --- a/web/src/assets/styles/index.scss +++ b/web/src/assets/styles/index.scss @@ -17,6 +17,62 @@ src: local(""), url("./fonts/SUSE-VariableFont_wght.ttf"); } +@font-face { + font-family: "Noto Sans SC"; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + src: local(""), url("./fonts/NotoSansSC-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Noto Sans SC Display"; + font-optical-sizing: auto; + font-weight: 600; + font-style: normal; + src: local(""), url("./fonts/NotoSansSC-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Noto Sans JP"; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + src: local(""), url("./fonts/NotoSansJP-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Noto Sans JP Display"; + font-optical-sizing: auto; + font-weight: 600; + font-style: normal; + src: local(""), url("./fonts/NotoSansJP-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Noto Sans KR"; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + src: local(""), url("./fonts/NotoSansKR-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Noto Sans KR Display"; + font-optical-sizing: auto; + font-weight: 600; + font-style: normal; + src: local(""), url("./fonts/NotoSansKR-VariableFont_wght.ttf"); +} + +@font-face { + font-family: "Roboto Mono"; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + src: local(""), url("./fonts/RobotoMono-VariableFont_wght.ttf"); +} + :root { --agm-t--color--pine: #0c322c; --agm-t--color--pine--shade--100: #025937; @@ -43,9 +99,9 @@ --pf-t--global--color--brand--default: var(--agm-t--color--pine); --pf-t--global--color--brand--hover: var(--agm-t--color--pine--shade--100); - --pf-t--global--font--family--100: "SUSE Text"; - --pf-t--global--font--family--200: "SUSE Display"; - --pf-t--global--font--family--300: "Roboto mono", monospace; + --pf-t--global--font--family--100: "SUSE Text", verdana; + --pf-t--global--font--family--200: "SUSE Display", verdana; + --pf-t--global--font--family--300: "Roboto Mono", monospace; --pf-t--global--font--line-height--100: 1.3; --pf-t--global--font--line-height--200: 1.5; --pf-t--global--font--size--100: 0.875rem; @@ -70,6 +126,21 @@ --pf-t--global--color--brand--clicked: var(--agm-t--color--pine); } +:root[lang="zh"] { + --pf-t--global--font--family--100: "Noto Sans SC"; + --pf-t--global--font--family--200: "Noto Sans SC Display", "Noto Sans SC", serif; +} + +:root[lang="ja"] { + --pf-t--global--font--family--100: "Noto Sans JP", serif; + --pf-t--global--font--family--200: "Noto Sans JP Display", "Noto Sans JP", serif; +} + +:root[lang="ko"] { + --pf-t--global--font--family--100: "Noto Sans KR", serif; + --pf-t--global--font--family--200: "Noto Sans KR Display", "Noto Sans KR", serif; +} + // Temporary CSS rules written during migration to PFv6 // Reserve the sidebar space also for "lg" breakpoint diff --git a/web/src/context/installerL10n.tsx b/web/src/context/installerL10n.tsx index a39feda55d..b165083ff2 100644 --- a/web/src/context/installerL10n.tsx +++ b/web/src/context/installerL10n.tsx @@ -273,6 +273,8 @@ function InstallerL10nProvider({ const newLanguage = findSupportedLanguage(candidateLanguages) || "en-US"; const mustReload = storeAgamaLanguage(newLanguage); + document.documentElement.lang = newLanguage.split("-")[0]; + if (mustReload) { reload(newLanguage); } else {