Google is working on a HTTP extension for exposing more client information
tools.ietf.org
tools.ietf.org
"Transmitted Client Hints header fields SHOULD NOT provide new information that is otherwise not available to the application via other means, such as using HTML, CSS, or JavaScript."
However, this spec really neatly wraps all this information together in a package that will make it much more easy to abuse.
Also, browsers could round viewport width information to the nearest popular size.