1pub mod material3;
2mod symbol;
3pub use symbol::Symbol;
4
5use repose_core::View;
6use repose_ui::{Text, TextStyle};
7
8pub fn install_material_symbols_font(bytes: &'static [u8]) {
10 repose_text::register_font_data(bytes);
11}
12
13#[macro_export]
15macro_rules! material_symbols {
16 ( $($name:ident : $ch:literal),* $(,)? ) => {
17 pub struct Symbols;
18 impl Symbols {
19 $(
20 pub const $name: $crate::Symbol =
21 $crate::Symbol::new(stringify!($name), $ch);
22 )*
23 }
24 };
25}
26
27pub fn Icon(symbol: Symbol) -> View {
29 Text(symbol.codepoint.to_string()).font_family("Material Symbols Outlined")
30}