pub fn new(font: SF, graphics: &mut Graphics) -> Result<Self> {
        let (texture, glyph_tex_coords) =
            build_glyph_atlas(&font, &graphics.device)?;

        let texture_handle = graphics.add_texture(texture)?;

        Ok(Self {
            font,
            texture_handle,
            glyph_tex_coords,
            _p: PhantomData,
        })
    }
/// create a new text renderer for a particular font.
create a new text renderer for a particular font.
create a new text renderer for a particular font .
pub fn new(font: SF, graphics: &mut Graphics) -> Result<Self> {
        let (texture, glyph_tex_coords) =
            build_glyph_atlas(&font, &graphics.device)?;
        let texture_handle = graphics.add_texture(texture)?;
        Ok(Self {
            font,
            texture_handle,
            glyph_tex_coords,
            _p: PhantomData,
        })
    }
pub fn new ( font : SF , graphics : & mut Graphics ) -> Result < Self > { let ( texture , glyph_tex_coords ) = build_glyph_atlas ( & font , & graphics . device ) ? ; let texture_handle = graphics . add_texture ( texture ) ? ; Ok ( Self { font , texture_handle , glyph_tex_coords , _p : PhantomData , } ) }
create a new text renderer for a particular font.
create a new text renderer for a particular font .
font
SF
graphics
&mut Graphics