enable japanese, chinese, korean fonts

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-02-12 01:07:39 -08:00
parent 0945b21710
commit 0f2a5c3055

View File

@@ -46,12 +46,10 @@ pub fn setup_gossip_fonts(ctx: &egui::Context) {
)), )),
); );
if cfg!(feature = "lang-cjk") { font_data.insert(
font_data.insert( "NotoSansCJK".to_owned(),
"NotoSansCJK".to_owned(), FontData::from_static(include_bytes!("../assets/fonts/NotoSansCJK-Regular.ttc")),
FontData::from_static(include_bytes!("../assets/fonts/NotoSansCJK-Regular.ttc")), );
);
}
font_data.insert( font_data.insert(
"Inconsolata".to_owned(), "Inconsolata".to_owned(),
@@ -79,9 +77,9 @@ pub fn setup_gossip_fonts(ctx: &egui::Context) {
); );
let mut proportional = vec!["DejaVuSans".to_owned(), "NotoEmoji-Regular".to_owned()]; let mut proportional = vec!["DejaVuSans".to_owned(), "NotoEmoji-Regular".to_owned()];
if cfg!(feature = "lang-cjk") { //if cfg!(feature = "lang-cjk") {
proportional.push("NotoSansCJK".to_owned()); proportional.push("NotoSansCJK".to_owned());
} //}
families.insert(FontFamily::Proportional, proportional); families.insert(FontFamily::Proportional, proportional);