3 ms·
All sizes in dialog templates are indeed specified in "dialog units", which are based on the metrics of the dialog's font. So in theory if you are to double the
by latitude 13y ago
All sizes in dialog templates are indeed specified in "dialog units", which are based on the metrics of the dialog's font. So in theory if you are to double the font size, all dialog elements would just double in size and all will be well.
In practice, this is not sufficiently accurate to accommodate text size differences when going from one font/size to another. It's just too crude.
For example - http://imgur.com/STtd8OQ http://imgur.com/STtd8OQ
Top is SegoeUI/9pt, standard for DPI of 96.
Middle is SegoeUI/10pt, standard for DPI of 125.
Bottom is Tahoma/8pt, standard for XP at 96.
See how bottom two trim "practice"? That shouldn't be happening, but it does.
- sliverstorm 13y agoSo wouldn't you just force the font?
- wtallis 13y agoOn Windows, requesting a particular font size is just a hope and a prayer. The OS will draw things at the size it thinks is best, with heavy-handed hinting, so the size of a rendered piece of text is quite non-linear with respect to font size: http://damieng.com/blog/2007/06/13/font-rendering-philosophies-of-windows-and-mac-os-x http://damieng.com/blog/2007/06/13/font-rendering-philosophi... This makes it quite impossible for an application to implement a general solution to the problem. You pretty much have to treat HiDPI as another translation of the GUI with respect to sizing things.