Skip to content

LabelTTF not using correct texture (or texcoord) for some chars #8468

@minggo

Description

@minggo

Note

This issue is migrated from here. It was created at 2014/06/11 15:44:26 +0000

Description

Hi,

I found a weird bug in the new LabelTTF (I'm using the cocos2d-x-3.1 git tag currently).

As seen in my screenshots, some chars for some texts are wrong.
This not happen always, but I identified a couple of variables that trigger the bug.

In order to produce the bug with my example project (files attached), you have to:
1/ Use the provided "http://www.cocos2d-x.org/attatchments/5098/" font
2/ have a setContentScaleFactor(2.0f) for the director
3/ enableOutline on the TTF font
4/ Use the text I'm set for the labels

If you change any of those variables, the bug might not occur (like using 1.0f for scaleFactor, or not enabling the Ouline, or using "text 1", "text 2", "text 3" for the labels).

Any idea on what's wrong?
If a fix is available, can you push it to the v3.1 branch too, please? (I lost a month to migrate from cocos v2 to v3.1, I don't want to migrate again to v3.2) :D

PS: I'm using windows to debug the code, that's why I altered the AppDelegate to simulate an iPadRetina using windows project

Comments

  • dakiki added comment:
    Confirmed fixed in current dev branch.

Is it possible to maintain 2 branches, the dev one, and the stable one including critical fixes. A branch where massive changes won't affect working projects?

  • dakiki added comment:
    Confirmed that cherry-picking 4e07595 on a v3.1.1 is fixing the issue.

v3.2 beta is so much buggy that I cannot use it (a new bug appeared recently with alpha value on LabelBM, probably incorrect blend mode)

  • dakiki added comment:
    Could someone please cherry-pick that commitId into the 3.1-hotfix branch?
    Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions