egui-twemoji

An egui widget that renders colored Twemojis

5 releases (breaking)

0.5.0 Oct 6, 2024
0.4.0 Aug 26, 2024
0.3.0 Apr 23, 2024
0.2.0 Apr 20, 2024
0.1.0 Apr 19, 2024

#263 in GUI

Download history 17/week @ 2024-07-26 4/week @ 2024-08-02 144/week @ 2024-08-23 18/week @ 2024-08-30 15/week @ 2024-09-13 10/week @ 2024-09-20 5/week @ 2024-09-27 166/week @ 2024-10-04 20/week @ 2024-10-11

202 downloads per month

Unlicense OR MIT OR Apache-2.0

38KB
291 lines

egui-twemoji

docs.rs Downloads on Crates.io

An egui widget that renders colored Twemojis. Based on twemoji-assets.

demo

How to use

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.

Features

  • 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.

License

Unlicense OR MIT OR Apache-2.0

Dependencies

~26MB
~141K SLoC