How to determine the real font size?
-
When you change the font size for a control in Visual Studio, you can often see that VS seems to know better; e.g. you select Arial 10, and when you look at the property window afterwards, it has changed to 10.2. My experience with a little proportional resizing tool I wrote in C# seems to imply that this happens at runtime as well, which causes problems when labels are to close to each other (they may overlap when I have computed their positions based on font size 10 but really they autosize to 10.2). Does anybody know how I can determine at runtime with which font size a text is actually being rendered? And what the reason for all this is anyway? Graphics isn't exactly my strong point, and I'm running out of ideas for search criteria to find something related.