pub fn layout_debug(
        &self,
        line_length: usize,
        pos: [f32; 2],
        color: [f32; 4],
    ) -> Batch {
        let full_text = self
            .font
            .codepoint_ids()
            .enumerate()
            .flat_map(|(i, (_glyph_id, c))| {
                if i != 0 && i % line_length == 0 {
                    Some('\n')
                } else {
                    None
                }
                .into_iter()
                .chain(std::iter::once(c))
            })
            .collect::<String>();

        self.layout_text(&full_text, pos, color)
    }
/// Layout the entire set of renderable glyphs for the current font.
///
/// # Params
///
/// - line_length: the character length of each line
/// - pos: the location for the baseline of the rendered text
Layout the entire set of renderable glyphs for the current font.
Layout the entire set of renderable glyphs for the current font .
pub fn layout_debug(
        &self,
        line_length: usize,
        pos: [f32; 2],
        color: [f32; 4],
    ) -> Batch {
        let full_text = self
            .font
            .codepoint_ids()
            .enumerate()
            .flat_map(|(i, (_glyph_id, c))| {
                if i != 0 && i % line_length == 0 {
                    Some('\n')
                } else {
                    None
                }
                .into_iter()
                .chain(std::iter::once(c))
            })
            .collect::<String>();
        self.layout_text(&full_text, pos, color)
    }
pub fn layout_debug ( & self , line_length : usize , pos : [ f32 ; 2 ] , color : [ f32 ; 4 ] , ) -> Batch { let full_text = self . font . codepoint_ids ( ) . enumerate ( ) . flat_map ( | ( i , ( _glyph_id , c ) ) | { if i != 0 && i % line_length == 0 { Some ( '\n' ) } else { None } . into_iter ( ) . chain ( std :: iter :: once ( c ) ) } ) . collect :: < String > ( ) ; self . layout_text ( & full_text , pos , color ) }
Layout the entire set of renderable glyphs for the current font.
Layout the entire set of renderable glyphs for the current font .
&self
line_length
usize
pos
[f32; 2]
color
[f32; 4]
params
the character length of each line
pos: the location for the baseline of the rendered text
the character length of each line pos : the location for the baseline of the rendered text