Skip to content

Commit

Permalink
Merge pull request #625 from Stoppedpuma/extra-language-stuff
Browse files Browse the repository at this point in the history
Extra language stuff
  • Loading branch information
woelper authored Jan 22, 2025
2 parents eeffcb5 + 1083b12 commit 1dcaaca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ This project is MIT licensed, but some parts such as the LUTs in res/LUT are und

</details>

<details>
<summary>Extended Language Support</summary>

Oculante can support some additional languages such as Arabic, Chinese, Japanese, and Korean. This support depends on if your system has a supported font family installed. One supported font family is [Noto Sans](https://fonts.google.com/noto/specimen/Noto+Sans).

</details>

<details>
<summary>Default Shortcuts</summary>

Expand Down
29 changes: 23 additions & 6 deletions src/ui/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,38 @@ pub fn load_system_fonts(mut fonts: FontDefinitions) -> FontDefinitions{
debug!("Attempting to load sys fonts");
let mut fontdb = HashMap::new();

fontdb.insert("chinese_simplified", vec![
fontdb.insert("simplified_chinese", vec![
"Heiti SC",
"Songti SC",
"Noto Sans CJK SC", // Good coverage for Simplified Chinese
"Noto Sans SC",
"Noto Sans CJK JP",
"Noto Sans JP",
"WenQuanYi Zen Hei",
"WenQuanYi Zen Hei", // INcludes both Simplified and Traditional Chinese.
"SimSun",
"MS Gothic",
"Noto Sans SC",
"PingFang SC",
"Source Han Sans CN",
]);

fontdb.insert("traditional_chinese", vec![
"Source Han Sans HK",
]);

fontdb.insert("japanese", vec![
"Noto Sans JP",
"Noto Sans CJK JP",
"Source Han Sans JP",
"MS Gothic",
]);

fontdb.insert("korean", vec![
"Source Han Sans KR",
]);

fontdb.insert("taiwanese", vec![
"Source Han Sans TW",
]);

fontdb.insert("arabic", vec![
fontdb.insert("arabic_fonts", vec![
"Noto Sans Arabic",
"Amiri",
"Lateef",
Expand Down

0 comments on commit 1dcaaca

Please sign in to comment.