AnsweredAssumed Answered

How to use the displayScaleFactor?

Question asked by ibroad on Jul 5, 2017
Latest reply on Jul 5, 2017 by ibroad

So, I guess I don't understand exactly how to take advantage of the displayScaleFactor value.

A scale factor for the current system display, based on the ratio of the logical DPI to the physical DPI.

 

I actually don't use it in my current app since I'm developing for a specific iPad model, but I know it could be useful in the future.

 

One part I don't understand is how do you know what to put for the initial value?

 

For example, if I had:

font.pixelSize: 14 * scaleFactor

 

How do I know to start with a size of 14? Does the scale factor make it so the font is truly pixel size 14 no matter which device?

 

I assume this is a dumb question, but there's something I don't complete understand. Is there any further documentation on this, or a simple explanation that might help me understand?

Outcomes