setWidth is not useful
I’m use .ttf font file.
I use the this code , and it is not useful.
can some one help me?
LabelTTFUnicodeChinese::LabelTTFUnicodeChinese()
{
auto size = Director::getInstance()->getWinSize();
// Adding “啊” letter at the end of string to make VS2012 happy, otherwise VS will generate errors
// like “Error 3 error C2146: syntax error : missing ‘)’ before identifier ‘label’”;
TTFConfig ttfConfig(“fonts/wt021.ttf”,55,GlyphCollection::CUSTOM, “美好的一天啊”);
auto label = Label::createWithTTF(ttfConfig,“美好的一天啊美好的一天啊美好的一天啊美好的一天啊美好的一天啊”, TextHAlignment::CENTER, 200);
label->setAnchorPoint(Point::ANCHOR_MIDDLE);
label->setPosition(Point(size.width / 2, size.height /2));
this->addChild(label);
}