Crates.io | egui-remixicon |
lib.rs | egui-remixicon |
version | 0.29.1 |
source | src |
created_at | 2023-10-24 15:49:18.03476 |
updated_at | 2024-10-06 16:55:10.723514 |
description | Remix Icon for egui |
homepage | |
repository | https://github.com/get200/egui-remixicon |
max_upload_size | |
id | 1012527 |
size | 4,022,844 |
Bundles Remix Icon with boilerplate to use in your egui app.
Got inspired by egui_phosphor, code uses the same structure.
Add the crate as a dependency in Cargo.toml:
egui-remixicon = "0.29.1"
On startup, update the fonts in your egui context:
let mut fonts = egui::FontDefinitions::default();
egui_remixicon::add_to_fonts(&mut fonts);
cc.egui_ctx.set_fonts(fonts);
If you would like to use this crate without egui or with an egui version that is out of sync with the latest version of this crate, you can add without default features:
egui-remixicon = { version="0.29.1", default-features=false }
The font file can then be accessed as
egui_remixicon::FONT
Use the constants provided by the crate in your text:
ui.label(egui::RichText::new(format!("{} Heart", egui_remixicon::icons::HEARTS_FILL)).size(32.0));
egui-remixicon is licensed under MIT OR Apache-2.0. Remix Icon are licensed under Apache-2.0.