fn main() -> eframe::Result<()> {
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
.with_inner_size([1360.0, 860.0])
.with_min_inner_size([900.0, 600.0])
.with_title("Icon Studio"),
renderer: eframe::Renderer::Glow,
..Default::default()
};
eframe::run_native(
"icon-studio",
options,
Box::new(|cc| {
// The icon picker renders Material Symbols as text, so egui needs
// the same font the rasteriser uses. Registered here rather than
// through egui_material_icons, whose 0.9 ships a newer font with
// codepoints that no longer match assets/*.codepoints; added as
// its 0.4 did, as the last fallback for proportional text.
let mut font = egui::FontData::from_static(icon_studio::render::FILLED);
font.tweak.y_offset_factor = 0.05;
cc.egui_ctx.add_font(egui::epaint::text::FontInsert::new(
"material-icons",
font,
vec![egui::epaint::text::InsertFontFamily {
family: egui::FontFamily::Proportional,
priority: egui::epaint::text::FontPriority::Lowest,
}],
));
Ok(Box::new(icon_studio::app::Studio::new()))
}),
)
}
neiam
/icon-studio
public · Issues · Pulls · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
1.3 KiB · text
History
b9e9582