top | item 35339143

(no title)

chess_buster | 2 years ago

You can get the device pixel ratio from JavaScript using Window.devicePixelRatio. Maybe you can then add this as a css-variable to the body element and query it later on to compute a size for the fonts so they can match the "native" size of the pixels, for example using ggt.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

discuss

order

No comments yet.