Crates.io | egui-twemoji |
lib.rs | egui-twemoji |
version | 0.5.0 |
source | src |
created_at | 2024-04-19 19:55:55.243897 |
updated_at | 2024-10-06 10:37:38.594064 |
description | An egui widget that renders colored Twemojis. |
homepage | https://github.com/zeozeozeo/egui-twemoji |
repository | https://github.com/zeozeozeo/egui-twemoji |
max_upload_size | |
id | 1214067 |
size | 136,321 |
An egui widget that renders colored Twemojis. Based on twemoji-assets.
Make sure you've installed egui_extras
image loaders (required for rendering SVG and PNG emotes):
// don't do this every frame - only when the app is created!
egui_extras::install_image_loaders(&cc.egui_ctx);
And then:
use egui_twemoji::EmojiLabel;
fn show_label(ui: &mut egui::Ui) {
EmojiLabel::new("⭐ egui-twemoji 🐦✨").show(ui);
}
For a more sophisticated example, see the demo
example (cargo run --example demo
)
EmojiLabel
supports all functions that a normal
Label does.
svg
: use SVG emoji assets (egui_extras/svg
is required)png
: use PNG emoji assets (egui_extras/image
is required)By default, the svg
feature is activated.
Unlicense OR MIT OR Apache-2.0