How in programs like photoshop function "show in real size" is implemented? it is necessary to implement a similar functionality in the most primitive form, so that some object on any monitor would be the same size (in centimeters).
1 answer
If we are talking about Windows, then automatic methods (without user calibration) will fail. The reason is that Windows does not know the actual screen size of your monitor.
Here is a similar question: https://stackoverflow.com/questions/12652835/getting-actual-screen-dpi-ppi-under-windows
In the book "The Old New Thing" R.Cher was a note on this topic.
The solution to the problem is to find out the model of the monitor from Windows, to have a large base of monitors in which their physical characteristics are described. Adobe can afford to have such a database and keep it up to date.
A cheap solution is to make a setting in your program - centimeter ruler centimeters by 10 and a slider. The user applies a ruler, moves the slider until it matches. In particular, this is implemented in the vector editor Inkscape, called "Zoom correction factor".
The solution for modern monitors is to get the physical dimensions of the screen from the EDID. https://en.wikipedia.org/wiki/Extended_Display_Identification_Data https://stackoverflow.com/questions/577736/how-to-obtain-the-correct-physical-size-of-the-monitor But as far as I understand, here the question is whether the video card driver copies this information from what the monitor gives, or simply generates its data.