#icons #egui #remix #ui #constants #heart #remixicon

egui-remixicon

为 egui 使用的 Remix 图标

4 个版本 (破坏性更新)

0.27.2 2024 年 4 月 20 日
0.26.2 2024 年 2 月 20 日
0.2.0 2024 年 1 月 22 日
0.1.0 2023 年 10 月 24 日

#119 in 图形 API

Download history 178/week @ 2024-04-29 43/week @ 2024-05-06 71/week @ 2024-05-13 61/week @ 2024-05-20 150/week @ 2024-05-27 114/week @ 2024-06-03 201/week @ 2024-06-10 255/week @ 2024-06-17 239/week @ 2024-06-24 793/week @ 2024-07-01 805/week @ 2024-07-08 222/week @ 2024-07-15 195/week @ 2024-07-22 339/week @ 2024-07-29 315/week @ 2024-08-05 227/week @ 2024-08-12

每月 1,083 次下载

MIT/Apache

660KB
3K SLoC

egui_remixicon

Remix Icon 与样板捆绑,以便在您的 egui 应用中使用。

受到 egui_phosphor 的启发,代码使用相同的结构。

安装

在 Cargo.toml 中将该包作为依赖项添加

egui-remixicon = "0.27.2"

在启动时,更新 egui 上下文中的字体

let mut fonts = egui::FontDefinitions::default();
egui_remixicon::add_to_fonts(&mut fonts);

cc.egui_ctx.set_fonts(fonts);

无需 egui 依赖项安装

如果您想在不依赖 egui 或使用与该包最新版本不兼容的 egui 版本的情况下使用此包,可以添加不带默认功能的包

egui-remixicon = { version="0.27.2", default-features=false }

字体文件可以按以下方式访问

egui_remixicon::FONT

使用

在您的文本中使用该包提供的常量

ui.label(egui::RichText::new(format!("{} Heart", egui_remixicon::icons::HEARTS_FILL)).size(32.0));

许可协议

egui-remixicon 在 MITApache-2.0 许可下发布。Remix Icon 在 Apache-2.0 许可下发布。

依赖项

~4.5–10MB
~82K SLoC