In my iPhone application, I set a custom font for all UILabels (more precisely, I subclassed UILabel by overriding the method, setting my own font in this method, and then setting all the labels in IB for this custom class). The problem is that all texts are too far below the expected baseline, so letters such as "y" and "g" are truncated below. I read about similar issues here:
UIButton Custom Font Alignment
Custom installed font does not display correctly in UILabel
Then I tried messing around with the clamping device as described in these solutions (it was originally set to 990). Installing it around 500 led to good results, but soon after that I noticed that the lines in multi-line texts mix with each other, which, of course, is unacceptable. In UITextViews, the font seems to look great with the source base, though ..
Is there a practical way to solve this problem? Of course, I could store several fonts with different ascending lines for texts with several or single-line texts, but this is a rather dirty solution.
PS: The font is provided in otf format, although I tried to convert it to ttf, which led to the same results.
bompf source share