Skip to main content

shape_text_zero_heap

Function shape_text_zero_heap 

pub fn shape_text_zero_heap(
    text: &str,
    origin_x: f32,
    origin_y: f32,
    font_size_px: f32,
    line_height_scale: f32,
    max_width_px: f32,
    color: [f32; 4],
    out_quads: &mut [MsdfTextQuad],
) -> ShapedTextRunMetrics
Expand description

Shapes a UTF-8 string into GPU-ready MsdfTextQuad instances in zero heap, performing pair kerning and greedy word-wrapping at max_width_px (when max_width_px > 0.0).