My initial 3 line fix for CCLabelBMFont and its width property now deals with a number of problems that have been discussed in other posts, hopefully for once and for all.
I've put a post on my dev blog about the patch and I'm hoping it gets accepted!
- adds tests in the Cocos2D test suite for width
- also tests the alignment property
- handles breaking long strings correctly
- will break at word breaks first if possible
- you can access the sprites for glyphs
Notice that the documentation promises you can get the sprites, but its not working at present due to changes in the last few months that killed off getChildByTag. It was very flakey anyway. With my patch accessing sprites allows this: