问题
I have a design in an psd file. So I copied all text properties (fontname, size (in pt), color, etc) into code and run it. I did a screenshot and compared that to the design. I am wondering, why is iOS (in my case) rendering the font sizes (in pt) smaller than Photoshop does?
Does pt depend on the screen resolution? Is there maybe a helper function that i could calculate it from a px size?
Thanks...
回答1:
I think the easiest way (not sure if the most accurate one) would be to take pixel values (not point ones) from Photoshop and use those instead. Assuming you are designing Photoshop files that are 320x480 (not retina) this should work nicely and quite accurately.
Here's a sample, left is in Photoshop at size 12px and right is in iOS Simulator at 12pt.
回答2:
You have to change document resolution to 144 pixels/Inch and keep screen width 640px (for portrait orientation). Goto Image > Image Size > Resolution
回答3:
Photoshop ratina images-12Pt = Ios-6Pt(X=2*Y) photoshop not ratina images-12pt = Ios-12pt(X=Y)
来源:https://stackoverflow.com/questions/8834037/how-to-get-the-correct-font-sizes-from-photoshop-into-ios