cocos2d-x / cocos2dx-win8

102 stars 66 forks source link

Text drawing - a fix for the case with provided width only #16

Open mingulov opened 12 years ago

mingulov commented 12 years ago

If a width only was provided - it was possible that the text height will be lost, and for the case of 'Center' alignment it means that it would be centered around the 1st line also - just 2nd part of the text will be visible.

Fixed by an additional check to prevent such situation.

(for me it looks like a bug in DirectX if really, but perhaps it is done so due to compatibility issues)