No special effect added to the label.
anyone knows with this problem?
stroked chars.png (13.2 KB)
chars.png (13.2 KB)
No special effect added to the label.
anyone knows with this problem?
stroked chars.png (13.2 KB)
chars.png (13.2 KB)
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,
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.
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()
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.