Fix support_gfx font load order
@@ -66,22 +66,22 @@ pub fn run<F: FnMut(&Ui) -> bool>(title: String, clear_color: [f32; 4], mut run_
let font_size = (13.0 * hidpi_factor) as f32;
- imgui.fonts().add_font_with_config(
- include_bytes!("../mplus-1p-regular.ttf"),
+ imgui.fonts().add_default_font_with_config(
ImFontConfig::new()
.oversample_h(1)
.pixel_snap_h(true)
- .size_pixels(font_size)
- .rasterizer_multiply(1.75),
- &FontGlyphRange::japanese(),
+ .size_pixels(font_size),
);
- imgui.fonts().add_default_font_with_config(
+ imgui.fonts().add_font_with_config(
+ include_bytes!("../mplus-1p-regular.ttf"),
ImFontConfig::new()
.merge_mode(true)
.oversample_h(1)
.pixel_snap_h(true)
- .size_pixels(font_size),
+ .size_pixels(font_size)
+ .rasterizer_multiply(1.75),
+ &FontGlyphRange::japanese(),
);
imgui.set_font_global_scale((1.0 / hidpi_factor) as f32);
