diff options
author | 2025-02-05 02:20:36 +0100 | |
---|---|---|
committer | 2025-02-05 02:20:36 +0100 | |
commit | 4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd (patch) | |
tree | 076d5bcebcc1686c069d79375357ef013de16cc3 /examples/markdown/src/icon.rs | |
parent | 1f9723a9296082ea06b7280833c60e8f2e547cb5 (diff) | |
parent | ef25dfb7331c7ab5446e9b771c9bca8aff231957 (diff) | |
download | iced-4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd.tar.gz iced-4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd.tar.bz2 iced-4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd.zip |
Merge pull request #2786 from iced-rs/customizable-markdown
Customizable Markdown Rendering and Image Support
Diffstat (limited to 'examples/markdown/src/icon.rs')
-rw-r--r-- | examples/markdown/src/icon.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/markdown/src/icon.rs b/examples/markdown/src/icon.rs new file mode 100644 index 00000000..cfe32541 --- /dev/null +++ b/examples/markdown/src/icon.rs @@ -0,0 +1,15 @@ +// Generated automatically by iced_fontello at build time. +// Do not edit manually. Source: ../fonts/markdown-icons.toml +// dcd2f0c969d603e2ee9237a4b70fa86b1a6e84d86f4689046d8fdd10440b06b9 +use iced::widget::{text, Text}; +use iced::Font; + +pub const FONT: &[u8] = include_bytes!("../fonts/markdown-icons.ttf"); + +pub fn copy<'a>() -> Text<'a> { + icon("\u{F0C5}") +} + +fn icon(codepoint: &str) -> Text<'_> { + text(codepoint).font(Font::with_name("markdown-icons")) +} |