Font sizes are indicated in points. One point is 1/72 of an inch. The problem is that this is necessary with the jive with the rest of the forms of Windows, where almost everything is indicated in pixels. The problem is how many pixels make up the dot. It depends on the settings of your video adapter per inch.
The traditional setting is 96 dpi. Therefore, if you ask for a font with 9 points, you will get one that is 9/72 * 96 = 12 pixels. As long as the client area of ββthe control is at least 12 pixels high, the text displayed inside it will not be cropped.
However, you can change the DPI setting of the video adapter. They made it quite difficult in XP, you had to go to the Display applet Advanced setup to do this. It has become much easier in Vista, there is a direct link to it with a beautiful line and much more.
The next general setting is 120 dpi, 125% more dpi. This 9-ton font now needs 9/72 * 120 = 15 pixels. If the original control displaying this text is still at 12 pixels, the text will be cropped. In principle, the triggers are turned off.
So, to fix this, the Control.Size property of the controls on the form needs to be changed. They must be scaled to provide greater DPI settings. Windows Forms readily supports this. This is Form.AutoScaleMode, available with .NET 2.0. When you install it on something other than None, the automatic code inside Windows Forms is automatically turned on, which compensates for the difference between the machine that created the form and the machine that displays the form. In the case of 120 DPI, this will make the shape and controls larger. So that they can display text without trimming it.
But there are complications. Changing DPI settings is great for fonts. TrueType is a great technology that can display a beautiful type of any size. But scaling does not work well for images containing linear art. They get extra pixels or become fuzzy when they are scaled.
Return to fonts: if you change the DPI setting of the monitor, the user will expect the fonts to follow suit. It certainly worked the same in XP days. If you change the DPI setting of the video adapter, you will be prompted to restart the operating system. This was important then because there were many programs that used device fonts rather than TrueType fonts. Non-scalable fonts. New fonts are activated, which corresponds to the DPI setting. Thus, a larger value for video DPI corresponds to a larger size of the base size of the system.
Around the same time, some genius at Microsoft, since he was killed, came up with a really good idea. People who live in East Asia have a character-based writing system. Complex glyphs that require many pixels to show details. 12 pixels at 96 DPI does not leave much room to make a beautiful Chinese or Korean glyph. An increase in DPI obviously improves this, but at the cost of having fuzzy images. Idea: Increase the font size of the base system, but do not change the DPI video.
Now a new problem arises: how to autoscale the user interface. You can see this again in the values ββthat you can assign to the AutoScaleMode property, either Font or DPI. Which one is correct for the target machine is not easy to guess. A font is usually the best choice, as you want to make sure that the text is not cropped. However, if you want the images to be displayed in the correct size, you need DPI. When you want both to get stuck between a stone and a hard place, you cannot get out of this state if the size of the base font of the system does not match the DPI setting of the video.