gui: Increase default font size and use Noto Sans
This commit is contained in:
Binary file not shown.
@@ -246,6 +246,24 @@ impl Gfx {
|
||||
|
||||
let egui_glow = EguiGlow::new(event_loop, gl.clone(), None, None, true);
|
||||
|
||||
let mut fonts = egui::FontDefinitions::default();
|
||||
fonts.font_data.insert(
|
||||
"noto_sans".to_owned(),
|
||||
egui::FontData::from_static(include_bytes!("../../assets/NotoSans-Regular.ttf")).into(),
|
||||
);
|
||||
fonts
|
||||
.families
|
||||
.get_mut(&egui::FontFamily::Proportional)
|
||||
.unwrap()
|
||||
.insert(0, "noto_sans".to_owned());
|
||||
egui_glow.egui_ctx.set_fonts(fonts);
|
||||
|
||||
let mut style = (*egui_glow.egui_ctx.global_style()).clone();
|
||||
for font_id in style.text_styles.values_mut() {
|
||||
font_id.size *= 1.25;
|
||||
}
|
||||
egui_glow.egui_ctx.set_global_style(style);
|
||||
|
||||
window.set_visible(true);
|
||||
window.request_redraw();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user