include_font

Macro include_font 

Source
macro_rules! include_font {
    ($name:ident) => { ... };
}
Available on crate feature macros only.
Expand description

Includes a font file generated by the build_font! macro

NOTE: Due to existing issues with rust-analyzer you may need to restart the RA server (left side of bottom toolbar) after adding a new font file

This macro will include the generated code for the font’s symbols, and provide:

  • FONT_BYTES: The raw bytes of the font file
  • load_font(): A function that returns a font_map::font::Font instance describing the font and its symbols

§Example

use font_map::include_font;

include_font!(GoogleMaterialSymbols);

const DELETE: GoogleMaterialSymbols = GoogleMaterialSymbols::Delete;