Skip to content

Conversation

@moadib
Copy link
Contributor

@moadib moadib commented Mar 25, 2013

Font definition field "file" can contain underline character, fixed regexp for that

Modified LabelBMFont for conformity with cocos2d-x.

Without it cocos2d-html can't render correct multiline labels after calling setTextAlignment or setScale and can't handle strings with empty lines.

…egexp for that

Modified LabelBMFont for conformity with cocos2d-x
@moadib
Copy link
Contributor Author

moadib commented Apr 4, 2013

You can easy reproduce problem with string "Abcdefgh\n\nqwerty\nasad" and changing alignment to Right or Center, also you can add scale.

@linshun It is important :) Look at cocos2d-x, it contains this changes.

@linshun
Copy link

linshun commented May 24, 2013

The bug of "Font definition field "file" can contain underline character" has been fixed by this commit: a4707bf

@linshun
Copy link

linshun commented May 24, 2013

About the bug "Without it cocos2d-html can't render correct multiline labels after calling setTextAlignment or setScale and can't handle strings with empty lines", I checked your code with the latest version of Cocos2d-html5 on "develop" branch, and the bug can not be fixed.

@moadib
Copy link
Contributor Author

moadib commented May 24, 2013

I have no time to check it, but this changes allows html5 port of my existing game work same as native version. Anyway, at moment when i was pulled this changes, html5 code doesn't conform native version of labelbmfont.

@linshun
Copy link

linshun commented May 24, 2013

Thanks. We will track this issue, and fix it in next week.

@dingpinglv dingpinglv closed this May 27, 2014
@moadib moadib deleted the CCLabelBMFont_fix_alignment_and_scale_issues branch May 27, 2014 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants