Three20 framework with line-height?

346 views Asked by At

somebody knows if it's possible to set a specific line-height for three20-styled texts?

thanks

1

There are 1 answers

1
Eamonn Fallon On BEST ANSWER

There is no easy way to achieve decent line spacing on TTStyledText. It is really very noticeable when you use non-standard fonts at larger sizes. However you can get it working with a lot of hacking using TTStyledLayout and categories. Look at internal functions that modify _lineHeight and in particular

- (void)inflateLineHeight:(CGFloat)height

- (TTStyledFrame*)addFrameForText:(NSString*)text element:(TTStyledElement*)element ...

My version is way too messy to release but if someone had the time to do a clean implementation it would be a great addition to three20 (copy and paste would be a nice-to-have also)