rewrite it in rust #1

Merged
SonicSwordcane merged 20 commits from riir into main 2024-11-10 23:34:55 +00:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 498e6fbdcc - Show all commits

BIN
assets/selawk.ttf Normal file

Binary file not shown.

View File

@ -223,10 +223,12 @@ impl AppWindow {
);
context.set_ini_filename(None);
let font_size = (13.0 * self.hidpi_factor) as f32;
let font_size = (16.0 * self.hidpi_factor) as f32;
context.io_mut().font_global_scale = (1.0 / self.hidpi_factor) as f32;
context.fonts().add_font(&[FontSource::DefaultFontData {
context.fonts().add_font(&[FontSource::TtfData {
data: include_bytes!("../assets/selawk.ttf"),
size_pixels: font_size,
config: Some(imgui::FontConfig {
oversample_h: 1,
pixel_snap_h: true,
@ -235,6 +237,9 @@ impl AppWindow {
}),
}]);
let style = context.style_mut();
style.use_light_colors();
//
// Set up dear imgui wgpu renderer
//