As of Qt 5 documentation says:
The supported units are: px: pixels pt: the size of one point (i.e., 1/72 of an inch) em: the em width of the font (i.e., the width of 'M') ex: the ex width of the font (i.e., the height of 'x') However, Qt is limited to font sizes in pt and px and any other size must be in px, em or ex.
When they say 1em
is equivalent "M"
, which M do they mean? Which font and pt size do they take to calculate that? Based on some other answers I can speculate it is some 12pt font, but which?
The question has a background: Our Qt application has a normal user experience under Windows and Linux, but on Mac OS the fonts appear tiny. If I was able to figure out the relation of pt to em, I could set a better font default for MacOS.
em to pt conversions:
- This answer says: 12pt = 16px = 1em = 100% ,but it also says, it depends on the context (whatever context may mean there)
- Here it gives an approximate overview: http://www.sherriwyche.com/tools/fontconversion.html
- and here the same question answered.