LabelTTF::create("fds", "", 24);
这样fontname那不填表示使用设备默认字体
std::string lvstr = FunctionUtil::getChinese("guanka"); lvLabel = LabelTTF::create(lvstr.c_str(), "", 24); lvLabel->setColor(Color3B::WHITE); lvLabel->enableStroke(Color3B::BLACK, 1); //lvLabel->setTextColor(Color4B::WHITE); //lvLabel->enableOutline(Color4B::BLACK, 1); lvLabel->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT); this->addChild(lvLabel); lvLabel->setPosition(Vec2(2, s.height - 100))
可以用enableStroke描边,3.x的是用enableOutline描边