Is there any way to find out the physical size of a device's screen? (not the screen's resolution)
The reason I ask this is because I have a game where I display large texts using the string object and by switching paragraphs through code. The problem I'm having is that text will stop displaying completely after a certain limit is reached, and unfortunately that limit is directly dependent on the device's physical size, apparently.
I have a large text with font 25 display well on all mobile phones, but when I put it on a tablet, it stops displaying it completely. After a certain number of tests, I realized that the bigger the screen, the smaller the text I can fit inside a string object before it bugs out.
I want to modify the font size according to the device's screen's size, so for example in case the game is played on a 10 inch tablet, I lower the font to 16.
The most I could do so far is check if the device is a tablet, and since tablets are all above 7 inches, I lower the font size only for them. But the difference between 7 inch tablets and 10 inch tablets is too big to ignore.
So, does anyone know of a way to get the physical size of a device's screen?







Reply With Quote



