PistonDevelopers / gfx_graphics

A Gfx 2D back-end for the Piston game engine
MIT License
55 stars 31 forks source link

GlyphCache constructor should take in-memory font #321

Closed samestep closed 7 years ago

samestep commented 7 years ago

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.