You can see how Red is starting to approach this in http://www.red-lang.org/2017/07/063-macos-gui-backend.html, particularly the Cross Platform GUI Metrics section. It is a really hard problem. Technically it can be done, if you put all the onus on the user. The more we try to do for them, the harder it gets. It will always be a balance.