diff --git a/assets/JetBrainsMonoNL-Bold.ttf b/assets/JetBrainsMonoNL-Bold.ttf new file mode 100644 index 0000000..f78f84f Binary files /dev/null and b/assets/JetBrainsMonoNL-Bold.ttf differ diff --git a/assets/JetBrainsMonoNL-BoldItalic.ttf b/assets/JetBrainsMonoNL-BoldItalic.ttf new file mode 100644 index 0000000..9fb8c83 Binary files /dev/null and b/assets/JetBrainsMonoNL-BoldItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-ExtraBold.ttf b/assets/JetBrainsMonoNL-ExtraBold.ttf new file mode 100644 index 0000000..fe5be6a Binary files /dev/null and b/assets/JetBrainsMonoNL-ExtraBold.ttf differ diff --git a/assets/JetBrainsMonoNL-ExtraBoldItalic.ttf b/assets/JetBrainsMonoNL-ExtraBoldItalic.ttf new file mode 100644 index 0000000..59fc980 Binary files /dev/null and b/assets/JetBrainsMonoNL-ExtraBoldItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-ExtraLight.ttf b/assets/JetBrainsMonoNL-ExtraLight.ttf new file mode 100644 index 0000000..6da7b75 Binary files /dev/null and b/assets/JetBrainsMonoNL-ExtraLight.ttf differ diff --git a/assets/JetBrainsMonoNL-ExtraLightItalic.ttf b/assets/JetBrainsMonoNL-ExtraLightItalic.ttf new file mode 100644 index 0000000..5733efc Binary files /dev/null and b/assets/JetBrainsMonoNL-ExtraLightItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-Italic.ttf b/assets/JetBrainsMonoNL-Italic.ttf new file mode 100644 index 0000000..4e9c380 Binary files /dev/null and b/assets/JetBrainsMonoNL-Italic.ttf differ diff --git a/assets/JetBrainsMonoNL-Light.ttf b/assets/JetBrainsMonoNL-Light.ttf new file mode 100644 index 0000000..0b79b0c Binary files /dev/null and b/assets/JetBrainsMonoNL-Light.ttf differ diff --git a/assets/JetBrainsMonoNL-LightItalic.ttf b/assets/JetBrainsMonoNL-LightItalic.ttf new file mode 100644 index 0000000..b5e0842 Binary files /dev/null and b/assets/JetBrainsMonoNL-LightItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-Medium.ttf b/assets/JetBrainsMonoNL-Medium.ttf new file mode 100644 index 0000000..1454372 Binary files /dev/null and b/assets/JetBrainsMonoNL-Medium.ttf differ diff --git a/assets/JetBrainsMonoNL-MediumItalic.ttf b/assets/JetBrainsMonoNL-MediumItalic.ttf new file mode 100644 index 0000000..8d63c6c Binary files /dev/null and b/assets/JetBrainsMonoNL-MediumItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-Regular.ttf b/assets/JetBrainsMonoNL-Regular.ttf new file mode 100644 index 0000000..70d2ec9 Binary files /dev/null and b/assets/JetBrainsMonoNL-Regular.ttf differ diff --git a/assets/JetBrainsMonoNL-SemiBold.ttf b/assets/JetBrainsMonoNL-SemiBold.ttf new file mode 100644 index 0000000..ce60a88 Binary files /dev/null and b/assets/JetBrainsMonoNL-SemiBold.ttf differ diff --git a/assets/JetBrainsMonoNL-SemiBoldItalic.ttf b/assets/JetBrainsMonoNL-SemiBoldItalic.ttf new file mode 100644 index 0000000..3b3f8f6 Binary files /dev/null and b/assets/JetBrainsMonoNL-SemiBoldItalic.ttf differ diff --git a/assets/JetBrainsMonoNL-Thin.ttf b/assets/JetBrainsMonoNL-Thin.ttf new file mode 100644 index 0000000..bea837e Binary files /dev/null and b/assets/JetBrainsMonoNL-Thin.ttf differ diff --git a/assets/JetBrainsMonoNL-ThinItalic.ttf b/assets/JetBrainsMonoNL-ThinItalic.ttf new file mode 100644 index 0000000..f0bfed7 Binary files /dev/null and b/assets/JetBrainsMonoNL-ThinItalic.ttf differ diff --git a/src/app.rs b/src/app.rs index 683b552..6480148 100644 --- a/src/app.rs +++ b/src/app.rs @@ -45,6 +45,26 @@ impl TemplateApp { return eframe::get_value(storage, eframe::APP_KEY).unwrap_or_default(); } + // FIXME: Merge JetBrains Mono font variants into one .ttf file to support + // bolds/italic/boldi-italic etc. + // See https://github.com/emilk/egui/discussions/1862. + + let mut fonts = egui::FontDefinitions::default(); + + fonts.font_data.insert( + "JetBrains Mono".to_owned(), + egui::FontData::from_static(include_bytes!("../assets/JetBrainsMonoNL-Regular.ttf")), + ); + + // Set JetBrains Mono as highest priority for monospaced fonts. + fonts + .families + .entry(egui::FontFamily::Monospace) + .or_default() + .insert(0, "JetBrains Mono".to_owned()); + + cc.egui_ctx.set_fonts(fonts); + Default::default() } }