For some reason any value of pixel ratio less than 1 does not work in my rendering algorithm. A value of zero does not make sense, however 0.5 does. Is it possible that devicePixelRatio
return a value between 0 and 1?
DPR can be less than 1, if you set browser zoom to less than 100%. For a zoom factor of 50%, DPR would be 0.5.
Adjust browser zoom to below 100% and run this snippet, it will log the DPR:
console.log("devicePixelRatio:", window.devicePixelRatio);
Testing with Firefox I got min. DPR of ~0.34, with Chrome I got it down to 0.25.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With