In an iOS category on NSAttributedString, I have the following:
CTLineRef line = CTLineCreateWithAttributedString((CFAttributedStringRef)self);
CGFloat ascent;
CGFloat descent;
double length = CTLineGetTypographicBounds(line, &ascent, &descent, NULL);
// at this point, ascent and descent always come back as zero.
According to the docs, it appears that these should be the ascent and descent of the line. But they aren't.
The width is not returning zero.
That said, if I then draw the line, it draws just fine.
Am I missing something?