Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LabelTTF limit is 20,152, can we get more? #18755

Closed
slackmoehrle opened this issue Mar 29, 2018 · 4 comments
Closed

LabelTTF limit is 20,152, can we get more? #18755

slackmoehrle opened this issue Mar 29, 2018 · 4 comments
Assignees
Milestone

Comments

@slackmoehrle
Copy link
Contributor

  • cocos2d-x version: v3

LabelTTF has a limit of 20,152. Some users want up to 30,000.

void I18n_Historys::loadHistoryOnline(unsigned int h_id)
{
    _curr_history->text = "";
    for(int i=0; i<30000; i++)
    {
        _curr_history->text = _curr_history->text + "0";
    }
    if(_onHistoryCallback)
        _onHistoryCallback(true);
}
@drelaptop drelaptop added this to the 3.18 milestone May 22, 2018
@PatriceJiang PatriceJiang self-assigned this Nov 9, 2018
@stevetranby
Copy link
Contributor

I question whether this is available for all devices. I think the solution may need to be restrict text length to 2^16/4bytes (e.g. 16384). Not sure where the limit 20152 comes from, but maybe spaces don't affect the vert count and thus allow larger length limit?

@stevetranby
Copy link
Contributor

Cross-discussion:
#19160 (comment)

I think that to support/fix this Issue cocos2d should handle creating additional vertex buffers in order to render beyond 10k letters. As a practical matter the only situation I see a need for this is in scrolling?

@drelaptop
Copy link
Contributor

similar same issue #17946

@drelaptop
Copy link
Contributor

fix by strip the extra text, refer to #19174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants