Struct conrod::text::font::Map
[−]
[src]
pub struct Map { /* fields omitted */ }
A collection of mappings from font::Id
s to rusttype::Font
s.
Methods
impl Map
[src]
fn new() -> Self
[src]
Construct the new, empty Map
.
fn get(&self, id: Id) -> Option<&Font>
[src]
Borrow the rusttype::Font
associated with the given font::Id
.
fn insert(&mut self, font: Font) -> Id
[src]
Adds the given rusttype::Font
to the Map
and returns a unique Id
for it.
fn insert_from_file<P>(&mut self, path: P) -> Result<Id, Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Insert a single Font
into the map by loading it from the given file path.
fn ids(&self) -> Ids
[src]
Produces an iterator yielding the Id
for each Font
within the Map
.