pub fn layout_text(
        &self,
        text: &str,
        pos: [f32; 2],
        color: [f32; 4],
    ) -> Batch {
        let glyphs =
            layout_paragraph(&self.font, ab_glyph::point(pos[0], pos[1]), text);

        let mut batch = Batch::default();
        batch.texture_handle = self.texture_handle;

        for glyph in glyphs {
            self.triangulate_glyph(glyph, color, &mut batch.vertices);
        }

        batch
    }
/// Render text with baseline at the given location.
///
/// Multiple batches from this renderer can be merged into a single
/// render batch if desired.
Render text with baseline at the given location.
Multiple batches from this renderer can be merged into a single
render batch if desired.
Render text with baseline at the given location . Multiple batches from this renderer can be merged into a single render batch if desired .
pub fn layout_text(
        &self,
        text: &str,
        pos: [f32; 2],
        color: [f32; 4],
    ) -> Batch {
        let glyphs =
            layout_paragraph(&self.font, ab_glyph::point(pos[0], pos[1]), text);
        let mut batch = Batch::default();
        batch.texture_handle = self.texture_handle;
        for glyph in glyphs {
            self.triangulate_glyph(glyph, color, &mut batch.vertices);
        }
        batch
    }
pub fn layout_text ( & self , text : & str , pos : [ f32 ; 2 ] , color : [ f32 ; 4 ] , ) -> Batch { let glyphs = layout_paragraph ( & self . font , ab_glyph :: point ( pos [ 0 ] , pos [ 1 ] ) , text ) ; let mut batch = Batch :: default ( ) ; batch . texture_handle = self . texture_handle ; for glyph in glyphs { self . triangulate_glyph ( glyph , color , & mut batch . vertices ) ; } batch }
Render text with baseline at the given location.
Render text with baseline at the given location .
&self
text
&str
pos
[f32; 2]
color
[f32; 4]