The "GlyphIter" function should use two seperate lifetimes for its iterator.
GlyphIter
is currently defined as:
pub struct GlyphIter<'b, I: Iterator>
where
I::Item: IntoGlyphId,
{
font: &'b Font<'b>,
itr: I,
}
However, consider the case where 'b
is static (e.g. I have loaded the Font
class using the try_from_vec
function). When glyphs_for
is called on the Font
, it finds that the anonymous reference used for Font
is not 'static
, so Font
is downgraded to some kind of non-static font. This has caused problems for me in my code. The easiest fix for this would be to have two lifetimes in the GlyphIter
: one for the borrowed Font
and one for the lifetime in the Font
object. I am willing to implement a pull request for this issue.