Chrome 怎么知道厘米是多少?
How does Chrome know what a centimeter is?
如问题标题所述,Chrome 其他网络浏览器和程序(如 MS Paint)从哪里获取有关构成一物理厘米需要多少像素的信息?
据我所知,此类程序不能仅假定标称像素大小,因为具有相同分辨率的显示器在其活动屏幕尺寸方面差异很大。因此,为了使其正常工作,显示器不仅要告诉计算机它有多少像素,还要告诉计算机它的活动区域有多大(就物理尺寸而言)。
我在网上找不到关于这个问题的任何信息,但我个人的猜测是 OS 从显示器的 EDID 中提取了这个信息。
但是这里有人肯定知道这个问题的答案吗?
正如 chiliNUT 在评论中指出的那样,浏览器中的物理单位不一定与现实中的物理单位相匹配,而是与像素的大小相关(例如 1 in = 96 px),如 link 下面:
https://developer.mozilla.org/en-US/docs/Web/CSS/length#Absolute_length_units
Absolute length units
Absolute length units represent a physical measurement when the physical properties of the output medium are known, such as for print layout. This is done by anchoring one of the units to a physical unit, and then defining the others relative to it. The anchor is done differently for low-resolution devices, such as screens, versus high-resolution devices, such as printers.
For low-dpi devices, the unit px represents the physical reference pixel; other units are defined relative to it. Thus, 1in is defined as 96px, which equals 72pt. The consequence of this definition is that on such devices, dimensions described in inches (in), centimeters (cm), or millimeters (mm) doesn't necessary match the size of the physical unit with the same name.
For high-dpi devices, inches (in), centimeters (cm), and millimeters (mm) are the same as their physical counterparts. Therefore, the px unit is defined relative to them (1/96 of 1 inch).
如问题标题所述,Chrome 其他网络浏览器和程序(如 MS Paint)从哪里获取有关构成一物理厘米需要多少像素的信息?
据我所知,此类程序不能仅假定标称像素大小,因为具有相同分辨率的显示器在其活动屏幕尺寸方面差异很大。因此,为了使其正常工作,显示器不仅要告诉计算机它有多少像素,还要告诉计算机它的活动区域有多大(就物理尺寸而言)。
我在网上找不到关于这个问题的任何信息,但我个人的猜测是 OS 从显示器的 EDID 中提取了这个信息。
但是这里有人肯定知道这个问题的答案吗?
正如 chiliNUT 在评论中指出的那样,浏览器中的物理单位不一定与现实中的物理单位相匹配,而是与像素的大小相关(例如 1 in = 96 px),如 link 下面:
https://developer.mozilla.org/en-US/docs/Web/CSS/length#Absolute_length_units
Absolute length units Absolute length units represent a physical measurement when the physical properties of the output medium are known, such as for print layout. This is done by anchoring one of the units to a physical unit, and then defining the others relative to it. The anchor is done differently for low-resolution devices, such as screens, versus high-resolution devices, such as printers.
For low-dpi devices, the unit px represents the physical reference pixel; other units are defined relative to it. Thus, 1in is defined as 96px, which equals 72pt. The consequence of this definition is that on such devices, dimensions described in inches (in), centimeters (cm), or millimeters (mm) doesn't necessary match the size of the physical unit with the same name.
For high-dpi devices, inches (in), centimeters (cm), and millimeters (mm) are the same as their physical counterparts. Therefore, the px unit is defined relative to them (1/96 of 1 inch).