Characters in Label(or LabelTTF) are stroked with gray borders in 3.0rc0

No special effect added to the label.
anyone knows with this problem?

Image Title
Image Title


stroked chars.png (13.2 KB)


chars.png (13.2 KB)

@aiyuzui you can reference this topic

I’m sorry,but I hadn’t add any outline or stroke effect to the label.It was only created,and added to it’s parent,and showed the gray stroke.It was just ok with beta2,…

ok,it is solved by replace font name to font file name,

@aiyuzui can you give me a sample to my email. I try to test it for u

Using label as:
Label::create(“xxxx”,“方正少儿_GBK.ttf”,32);
characters are all ok,but some not defined in ttf file will missed as replaced with blanks.

add ttf file to info.plist and use label as:
Label::create(“xxxx”,“FZShaoEr-M11”,32);
characters are stroked,but that not defined in ttf file will automatically replaced with system default,and won’t be missed.

Tested platform is iOS.

Hey, Maybe the problem is the same to as this http://www.cocos2d-x.org/forums/6/topics/50497

I just updated to cocos2d-x-3.0 and I can’t get rid of the stroke on my Labels. Any update or clues? I am using setColor.

@OhThePain Replace ‘setColor’ with ‘setTextColor’.

@aiyuzui I think the issue have been fixed at https://github.com/cocos2d/cocos2d-x/pull/6553.

@OhThePain Replace ‘setColor’ with ‘setTextColor’.

@aiyuzui I think the issue have been fixed at https://github.com/cocos2d/cocos2d-x/pull/6553.

Thanks WenHai,
I am using a LabelTTF so there is no setTextColor.

@OhThePain - One thing, I would update to v3 final instead of continuing with rc0. There were a lot of label fixes/enhancements, iirc.

could you use setFontFillColor()

http://www.cocos2d-x.org/reference/native-cpp/V3.0/d8/d34/classcocos2d_1_1_label_t_t_f.html#a99219063bbebe6f2ac0c221306bd5775

Same thing with v3 final.
I will start a new thread, since this thread mentions rc0 in the title.

in v3.0,create label with Label::createWithSystemFont,and then set as:
label->setBlendFunc(BlendFunc::ALPHA_PREMULTIPLIED);

Font looks ok.