Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

More Material icons

A regular desktop tool uses Icon (Save, Folder, Copy, Settings, …) with icon_svg:

let _ = icedtea::widget::icon_svg(
    icedtea::icon::Icon::Save,
    tok,
    icedtea::a11y::A11y::new("save", icedtea::a11y::Role::Image),
);

A product mark (a logo, a unique toolbar face) is Glyph::Bytes.

For a Sharp name that is not on Icon, download it, run adapt_material_svg once, commit the adapted SVG, and pass Glyph::Bytes. Those two functions ship in the crate. There is no extra package and no icedtea command to run.

material_symbol_sharp_url builds the Sharp FILL 1 URL. star is not on Icon:

https://fonts.gstatic.com/s/i/short-term/release/materialsymbolssharp/star/fill1/24px.svg
$ curl -fsSL -A icedtea \
    "https://fonts.gstatic.com/s/i/short-term/release/materialsymbolssharp/star/fill1/24px.svg" \
    -o star.raw.svg

Run adapt_material_svg on that file and keep the result as src/icons/star.svg in the application tree. Paint those bytes:

const STAR: &[u8] = include_bytes!("icons/star.svg");
let _ = icedtea::widget::icon_svg(
    icedtea::icon::Glyph::Bytes(STAR),
    tok,
    icedtea::a11y::A11y::new("star", icedtea::a11y::Role::Image),
);

Path data stays Google’s (Apache 2.0; keep a NOTICE line). Names are Sharp ids (star, arrow_back, draft). Browse Material Symbols.