Analysis of the reason why the font becomes larger when the DPI of Windows system grows

Source: Internet
Author: User

A recent study of WPF development, which mentions a feature of "Resolution independence", is the main feature of a desktop program that implements development that automatically scales the UI according to the DPI of the system when it is displayed on different resolutions of the computer, without causing distortion to the application.

This one mentions the system dpi, which we can set in our Windows system (regardless of XP or Vista win7, win8, WIN10, etc.). DPI is the number of pixels per inch, and an inch of the length of the presence of the pixel, it actually reflects a density problem. Windows system by default, the system DPI is 96DPI, here still have to pay attention to the actual physical DPI difference with the display: 1, the system DPI is defined by the operating system, you can modify the 2, the physical DPI, in fact, after the production of the Monitor is OK.

Before we increase the system dpi in the system, it will cause the font to become larger in the display, this is why?

Let's analyze why the system DPI increases, causing the same font to grow larger on the monitor. First of all, we need to know that the system to the same font, the size is not changed, not as the size of the 9th font is 0.1 inches, if we use the default system DPI value of 96, then the system will calculate that the 9th font should need 96*0.1 = 9.6 pixels to display. So when we set the system DPI to 100, the same font size is constant, 100*0.1 = 10 pixels to display, and for the display, the resolution does not become the case, you need to use more pixels to display the font, so that we see the word will naturally become larger.

Analysis of the reason why the font becomes larger when the DPI of Windows system grows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.