Function artano::load_typeface [] [src]

pub fn load_typeface<R: Read>(stream: &mut R) -> Result<Typeface>

Create a typeface based on font data.

This data will be found in a file like Impact.ttf somewhere on the host system. In theory, any TrueType font will work for this purpose, but some ttf files contain multiple fonts, in which case this function may fail, since it won't know which one to choose. In that event, it may be necessary to load the font yourself using rusttype.