2

I'm using following code to underline text.

NSMutableAttributedString *unserlineText = [[NSMutableAttributedString alloc] initWithString:@"yyyy JJJJ gggggg"];
[unserlineText addAttribute:NSUnderlineStyleAttributeName
                      value:[NSNumber numberWithInteger:NSUnderlineStyleSingle]
                      range:NSMakeRange(0, [unserlineText length])];

But the resulting string's underline is clipped from bottom by characters like 'y' and 'g'. You can see the results here.

enter image description here

Can we add some vertical space between text and underline.

Abid Hussain
  • 1,529
  • 1
  • 15
  • 33
  • 3
    This is typically how underlines look in English. It would be unusual if the underline were any lower. Descenders should penetrate it. – StilesCrisis Dec 30 '15 at 07:38

0 Answers0