Secondary glyph struct(s) with no reference to the font
I've been struggling with retrieving glyphs from a font through
Font::layout and then passing them to
Cache::queue_glyph, because since the
Glyph struct has a
font field that is lifetime-bound to the original Font, it enforces a lifetime parameter onto
PositionedGlyph, which makes it impossible to retrieve glyphs on the fly (e.g. in a closure) and then pass them to
queue_glyph requires the Glyphs to live at least as long as the Cache.
Therefore I'd like to suggest a way to store Glyphs that'd keep no reference to their Font, so that it's possible to cache them on the fly. Would this be possible? I thought (as the title says) of making secondary
NoRefPositionedGlyph structs that would do this and I can make a PR if that's cool, but I'm leaving an issue here just in case anyone has a better idea.