打印机点与iOS点 [英] Printers' points vs. iOS points

查看:138
本文介绍了打印机点与iOS点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为iPad编程时,字体(和其他)尺寸在点中指定。我已经看到一个点作为一个独立于屏幕分辨率的像素。但是,我无法确切地确定一个点实际上有多大(即以英寸为单位)。标准iPad屏幕上的点数是否等于1像素,因此1pt = 1 / 132in?然后,为了确认,这意味着一个iOS点是一个不同的单位比打印机的点= 1 / 72in?

谢谢。

解决方案

请参阅这里这里(向下滚动到点与像素)的官方字。基本上,一个点是非视网膜设备上的一个像素(因此iPad和iPhone之间的大小不同 - 与打印机的点无关),视网膜设备上有4个像素(其像素数量是像素的两倍在每个方向)。

绘图和定位的目的是让相同的代码可以在两种类型的设备上运行 - 框架将填补空白,以使绘图在视网膜设备上更平滑。

为了回答你的问题,一个iPad点不同于一个iPhone点,它不同于打印机点。

When programming for the iPad, font (and other) sizes are specified in "points." I have seen reference to a point as a pixel that is independent of screen resolution. But I am having trouble finding definite confirmation of how big a point is in real terms (that is, in terms of inches). Is a point equal to one pixel on the standard iPad screen, so 1pt = 1/132in? And then, to confirm, this means that an "iOS point" is a different unit than the printer's point = 1/72in?

Thanks.

解决方案

See here and here (scroll down to points vs. pixels) for the official word. Basically, a point is one pixel on a non-retina device (so the size varies between the iPad and the iPhone - it isn't related to a printer's point) and 4 pixels on a retina device (which has twice the number of pixels in each direction).

Drawing and positioning is done in points to allow the same code to run on both types of device - the frameworks will fill in the gaps to make drawing smoother on retina devices.

An iPad point is different to an iPhone point, which is different to a printers point, to answer your question.

这篇关于打印机点与iOS点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆