Currently, the only GlyphCache constructor (GlyphCache::new) takes an AsRef<Path> as an argument to specify the font. This makes it impossible to construct a GlyphCache without having the font in its own file on disk. I propose that the GlyphCache constructor be altered to instead take a Vec<u8> or a Font, to allow the user to pass an in-memory font.
Currently, the only
GlyphCache
constructor (GlyphCache::new
) takes anAsRef<Path>
as an argument to specify the font. This makes it impossible to construct aGlyphCache
without having the font in its own file on disk. I propose that theGlyphCache
constructor be altered to instead take aVec<u8>
or aFont
, to allow the user to pass an in-memory font.