Skip to main content

layout_block

Function layout_block 

Source
pub fn layout_block(
    registry: &FontRegistry,
    params: &BlockLayoutParams,
    available_width: f32,
    scale_factor: f32,
) -> BlockLayout
Expand description

Lay out a single block: resolve fonts, shape fragments, break into lines.

scale_factor is the device pixel ratio. Layout output is always in logical pixels; the scale factor affects shaping/rasterization precision.