Problem with Label in cocos2dx 3.1

Hello,

I am facing a problem with LabelTTF.

//Function
Label::createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment /* = TextHAlignment::CENTER /, int maxLineWidth / = 0 */)

We are trying to create 3 different label with enabling outlinesize and text color.We have given different text for label.In this situation there is an issue in renderdering the text .This issue does not appear if all the Label with the same text.We tried out with a test app. We are getting same issue.

We are using the following code.

TTFConfig ttfConfig(“fonts/arial.ttf”, 50, GlyphCollection::DYNAMIC,nullptr,true);

Label 1

ttfConfig.outlineSize = 5;
auto label2 = Label::createWithTTF(ttfConfig,“Outline”, TextHAlignment::CENTER);
label2->setPosition( Vec2(size.width/2, size.height*0.6) );
label2->setTextColor( Color4B::RED );
label2->enableOutline(Color4B(79,0,5,255));
addChild(label2);

Label 2

ttfConfig.outlineSize = 5;
auto label3 = Label::createWithTTF(ttfConfig,“Border”, TextHAlignment::CENTER);
label3->setPosition( Vec2(size.width/2, size.height*0.48) );
label3->setTextColor( Color4B::RED );
label3->enableOutline(Color4B(79,0,5,255));
addChild(label3);

Label 3

ttfConfig.outlineSize = 5;
auto label4 = Label::createWithTTF(ttfConfig,“Glow”, TextHAlignment::CENTER);
label4->setPosition( Vec2(size.width/2, size.height*0.36) );
label4->setTextColor( Color4B::RED );
label4->enableOutline(Color4B(79,0,5,255));
addChild(label4);

Have attached screenShot.

Can please anyone help us

Regards
Deepthi

hi @deepthi , could you test this code on v3.2? we have fixed some bugs related to Label after v3.1.

Hi
Thanks For the reply.
I will check in v3.2.

Regards
Deepthi

Does the issue be solved in v3.2?

Hi @owen, sorry for the delay.We tried out with v3.2.This issue has been solved.

Regards,
Deepthi