pub fn lcd_enabled() -> boolExpand description
Whether widgets should rasterise text through the LCD subpixel path.
Whether widgets should rasterise text through the LCD subpixel path.
Hard cap first: LCD is NEVER used above standard density. The gate
keys on the effective scale (crate::ux_scale::effective_scale =
device DPR × UX zoom), because LCD subpixel rendering only pays off when
individual physical pixels are large enough to resolve the R/G/B
sub-stripes — and “small pixels” come from a high UX zoom (mobile /
accessibility) just as much as from a HiDPI panel. Above 1.25× it is
pure overhead with no visible benefit, so we force the cheaper grayscale
path regardless of any explicit override. This also keeps
CPU-backbuffered widgets (the menu bar) off the LCD blit at high scale,
where they would otherwise shrink.
At standard density the explicit override set via set_lcd_enabled
wins if present; otherwise LCD defaults on. So platform shells generally
don’t need to call set_lcd_enabled at all.