如何转换PT用上?PT

2023-09-12 07:48:41 作者:淡看江湖路

我是一个可视化设计器,工作在Android的设计和我米试图SPEC我的PSD文件为我们的工程师,我似乎无法找到有关点数转化为任何Android的文件SP的类型的任何文件(只是,SP应该用于式)。

I am a visual designer, working on an android design and I"m trying to spec my PSD file for our engineers. I cannot seem to find any documentation regarding the conversion of point size to SP for the type in any Android documentation. (Just that SP should be used for type).

推荐答案

的问题是,它依赖于密度。真的,他们不是很好的测量,以试图比较。

The problem is that it depends on the density. Really, they're not good measurements to try to compare.

点:有12分的异食癖,每英寸6派卡,所以72(更准确地72.27)每英寸点数。

Points: There are 12 points in a pica, 6 picas per inch, so 72 (more accurately 72.27) points per inch.

设备无关的像素(DP):这将是等于像素大小为MDPI显示,1.5倍的像素尺寸为华电国际显示器,以及2倍的像素大小XHDPI显示器。 (如12dp = 12px的MDPI,18像素华电国际,24PX XHDPI)。

Device-Independent Pixels (DP): These will be equal to the pixel size for MDPI displays, 1.5x the pixel size for HDPI displays, and 2x the pixel size for XHDPI displays. (e.g. 12dp = 12px MDPI, 18px HDPI, 24px XHDPI).

缩放像素:这些将根据用户preference至更小或更大相当于到DP值,但缩放

Scaled Pixels: These will be equivalent to the DP value, but scaled according to the user preference to be smaller or larger.

如果你正在设计72 DPI(Photoshop的默认DPI设置),一个8磅字体将相当于8像素,这将在MDPI被8像素,12像素的华电国际,和16像素的XHDPI,或者更简单地说8DP所有密度。我不知道有多少比例被应用到不同的SP设置的,所以你必须去打猎了这一点,但基本上我只想给他们的样机,让他们适当的大小从那里 - 他们肯定能得到它pretty的接近视觉从。

If you're designing at 72 dpi (Photoshop default DPI setting), an 8pt font would be equivalent to 8px, which would be 8px at MDPI, 12px at HDPI, and 16px at XHDPI, or more simply 8dp for all densities. I don't know how much scaling gets applied to different SP settings, so you'd have to hunt that out, but basically I would just give them the mockup and let them size it appropriately from there -- surely they can get it pretty close visually from that.