Skip to content

Commit

Permalink
enable japanese, chinese, korean fonts
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Feb 12, 2024
1 parent 0945b21 commit 0f2a5c3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ pub fn setup_gossip_fonts(ctx: &egui::Context) {
)),
);

if cfg!(feature = "lang-cjk") {
font_data.insert(
"NotoSansCJK".to_owned(),
FontData::from_static(include_bytes!("../assets/fonts/NotoSansCJK-Regular.ttc")),
);
}
font_data.insert(
"NotoSansCJK".to_owned(),
FontData::from_static(include_bytes!("../assets/fonts/NotoSansCJK-Regular.ttc")),
);

font_data.insert(
"Inconsolata".to_owned(),
Expand Down Expand Up @@ -79,9 +77,9 @@ pub fn setup_gossip_fonts(ctx: &egui::Context) {
);

let mut proportional = vec!["DejaVuSans".to_owned(), "NotoEmoji-Regular".to_owned()];
if cfg!(feature = "lang-cjk") {
proportional.push("NotoSansCJK".to_owned());
}
//if cfg!(feature = "lang-cjk") {
proportional.push("NotoSansCJK".to_owned());
//}

families.insert(FontFamily::Proportional, proportional);

Expand Down

0 comments on commit 0f2a5c3

Please sign in to comment.