On my machine, xrandr reports my physical display size as 1mm x 1mm. This confuses the calc_dpi_factor function quite badly, resulting in a scale factor of over 500. I set my Xft.dpi setting, which resolved the issue locally, but it might be worth making calc_dpi_factor slightly better at detecting insane xrandr data.
My first thought is to make the calc_dpi_factor function bail out if the final scaling factor is absurdly large (>100 or something?), similar to how it warns and gives up if the height/width is 0. It might be simpler to just check for the 1mm x 1mm case, though.
My xrandr data for the display in question:
My actual usage via egui (with WINIT_X11_SCALE_FACTOR=randr):
On my machine, xrandr reports my physical display size as 1mm x 1mm. This confuses the
calc_dpi_factor
function quite badly, resulting in a scale factor of over 500. I set myXft.dpi
setting, which resolved the issue locally, but it might be worth makingcalc_dpi_factor
slightly better at detecting insane xrandr data.My first thought is to make the
calc_dpi_factor
function bail out if the final scaling factor is absurdly large (>100 or something?), similar to how it warns and gives up if the height/width is 0. It might be simpler to just check for the 1mm x 1mm case, though.My xrandr data for the display in question:
My actual usage via egui (with
WINIT_X11_SCALE_FACTOR=randr
):