Skip to content

Commit

Permalink
Change how we calculate height for a group of text. Previous to this …
Browse files Browse the repository at this point in the history
…changes, we would unecessarily add height when the frame contained multiple lines of text.
  • Loading branch information
boidanny committed Apr 3, 2012
1 parent e876343 commit 476cc73
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/Support/CoreText+Additions.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ CGSize AB_CTFrameGetSize(CTFrameRef frame)
CGFloat ascent, descent, leading;
CTLineGetTypographicBounds(lastLine, &ascent, &descent, &leading);
h = CGRectGetMaxY(frameRect) - lastLineOrigin.y + descent;
if(lines.count > 1) h += ascent + leading;
}

return CGSizeMake(ceil(w), ceil(h));
Expand Down

0 comments on commit 476cc73

Please sign in to comment.