I am doing some research to create a game that can scale its graphic resources in accordance with the DPI of any device.
To do this, I would like to be able to query the DPI of the device in order to scale assets accordingly.
This is a two-dimensional game, and the style style is suitable for arbitrary scaling.
An example of what I would do with res / dpi compilers:
iPhone / iTouch, at 320x480 (163 dpi) - text will be normal size
iPhone4, at 640x960 (326 dpi) - the text will be twice as large
iPad, at 768x1024 (132 dpi) - text is likely to be limited to a certain minimum size to take advantage of larger screen real estate.
So, on iPhone OS, is there a way to request a DPI screen?
(and as an additional note - is this possible on Android devices?)
source share