1

I know this question has been discussed over and over, but I still get confused with an answer to a very popular question in stackoverlow.

enter image description here

More specifically this example.

Simple question. Shouldn't the text in DP and SP look the same on all screens ? They both have ~160 physical units per inch. My only assumption is the text referenced to 30sp is dependent of another factor.

Community
  • 1
  • 1
pelican_george
  • 961
  • 2
  • 13
  • 33

1 Answers1

5

Not necessarily, DP is independent of a user's font settings whereas SP retains it. If a user has their settings so that the font on their device is enlarged (for accessibility reasons for example), SP will take that into account, whereas DP will not.

Alvin Abia
  • 1,221
  • 1
  • 17
  • 18