Drew McCormack
Drew McCormack

Reputation: 3592

Self installed fonts have wrong line height in UILabel

I have installed two custom TTF fonts in my iPhone app (Cardo and New Athena Unicode). These are used in a multi-line UILabel, but for some reason the line height seems messed up: the lines have a lot of overlap.

What could cause this? Is it a bug in UILabel, or are the fonts not right? How can I edit or examine the contents of a TTF font file?

The overlapping text in question

Upvotes: 3

Views: 1640

Answers (1)

Mr. Berna
Mr. Berna

Reputation: 10645

It's probably the fonts. Please try changing only the font used in your app. Use an included iOS font. If the label displays correctly by just changing the fonts used, it is the font's fault. If not, post the code so we can track down the problem.

You can edit fonts with a number of programs such as Fontlab, Fontographer, TypeTool, FontForge, etc. As BobC mentions in a comment, there may be licensing issues.

Upvotes: 3

Related Questions