UIFont: Font size differs

paskl

I am setting a custom font to all subviews (such as UILabels) inside my view by a custom function. However, if I try to correct the font size for specific UILabels only via

[lbl_EXAM_Statistics setFont:[UIFont fontWithName:@"PTSans-Regular" size:13]];

The 13point seems to be a little "too small" from what was given me from the Screendesign. In the psd file however its 13pt to be exact.

Why does the 13pt font size differ from the 13pt font size in my app?

In the screenshot the above text is from the psd file, the bottom one from the iphone simulator.

If I want to get near the text size from the Screendesign to my app I'd have to use somewhat of 18pt - but I cant waste time playing around how to get the exact pt, thats a huge timewaste with all the font size I have to specify directly. So there must be a better way.

enter image description here

Tancrede Chazallet

Totally depends on your psd. Best is to set your metrics in Photoshop in pixels. So you can see the size of your font in pixels.

Then if your PSD is at retina size (640 px width), you just have to devide by 2 the px size of your font and you will have the good result on your app.

In the end, don't use pt but px in your PSD and it will be allright (just have to think that 1point in iOS is 2px on retina screen and 1px on non-retina)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive