Skip to content

Commit f0622b8

Browse files
committed
Merge pull request #710 from SRandazzo/label_size_rendering
Round calculated label sizes up to prevent strings from not rendering
2 parents 5afc141 + a3e7885 commit f0622b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cocos2d/CCLabelTTF.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,9 @@ - (CCTexture*) createTextureWithAttributedString:(NSAttributedString*)attributed
528528
dimensions = [attributedString boundingRectWithSize:NSSizeFromCGSize(dimensions) options:NSStringDrawingUsesLineFragmentOrigin].size;
529529
#endif
530530

531+
dimensions.width = ceil(dimensions.width);
532+
dimensions.height = ceil(dimensions.height);
533+
531534
wDrawArea = dimensions.width;
532535
hDrawArea = dimensions.height;
533536

0 commit comments

Comments
 (0)