Skip to content

Lightweight native Discord client for Windows, Linux and macOS, written in Rust. No Electron, no browser engine.

Thai font fallback on Linux and macOS (#64)

Bank6048e3ea6c22
diff --git a/apps/rustcord/src/style.rs b/apps/rustcord/src/style.rs
index f0fbe54..4729385 100644
--- a/apps/rustcord/src/style.rs
+++ b/apps/rustcord/src/style.rs
@@ -839,6 +839,12 @@ pub fn install_fonts(ctx: &egui::Context) {
("noto-cjk", "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc", false),
("noto-cjk-arch", "/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", false),
("noto-cjk-fedora", "/usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-Regular.ttc", false),
+ // Thai.
+ ("noto-thai", "/usr/share/fonts/truetype/noto/NotoSansThai-Regular.ttf", false),
+ ("noto-thai-arch", "/usr/share/fonts/noto/NotoSansThai-Regular.ttf", false),
+ ("noto-thai-fedora", "/usr/share/fonts/google-noto/NotoSansThai-Regular.ttf", false),
+ // (Fedora installs the variable font by default.)
+ ("noto-thai-fedora-vf", "/usr/share/fonts/google-noto-vf/NotoSansThai[wght].ttf", false),
]
} else if cfg!(target_os = "macos") {
// Symbols, Chinese and Japanese (Hiragino Sans GB has kana too) and
@@ -847,6 +853,8 @@ pub fn install_fonts(ctx: &egui::Context) {
("apple-symbols", "/System/Library/Fonts/Apple Symbols.ttf", false),
("hiragino-sans-gb", "/System/Library/Fonts/Hiragino Sans GB.ttc", false),
("apple-sd-gothic-neo", "/System/Library/Fonts/AppleSDGothicNeo.ttc", false),
+ // Thai.
+ ("thonburi", "/System/Library/Fonts/Thonburi.ttc", false),
]
} else {
&[]