Skip to main content

logical_size

Function logical_size 

Source
pub fn logical_size(
    physical_width: u32,
    physical_height: u32,
    scale: f64,
) -> (f64, f64)
Expand description

Logical (density-independent) size from a physical pixel size and an already-sanitize_scaled scale factor, mirroring the desktop shell’s HiDPI math: lay out in logical pixels, then scale the scene by scale so glyphs re-rasterise sharp at physical resolution.