title: Find devicePixelRatio according to both page zoom level and Windows 10 DPI settings
body: <p>I need to expand the <code>canvas</code> to full screen, when I'm going to the fullscreen mode in my game.
  I use <code>screen.width</code> and <code>screen.height</code> to detect the screen size.
  The problem is, if screen scale settings in Windows 10 are set not to 100%, <code>screen.width</code> is less than actual screen size. For ex., if it is 150% scale in Windows settings, screen.width is 1280, but in the page space it is still 1920 px.</p>
  
  <p>I can use <code>window.devicePixelRatio</code>, which returns 1.5 in this case, for correcting the size. But the page zooming also affects <code>devicePixelRatio</code> value.</p>
  
  <p>So, if the page is zoomed to 67% and Windows screen scaling is 150%, <code>devicePixelRatio</code> will return 1.0, but <code>screen.width</code> returns 1280. But I need the way to know that the screen size is 1920.</p>
  
  <p>The Windows 10 scale settings I'm talking about:<br>
  <a href="https://i.stack.imgur.com/MXg68.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MXg68.png" alt="The Windows 10 scale settings I&#39;m talking about"></a></p>