cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

Label::createWithTTF, text with accents does not show #18285

Open gaetandezeiraud opened 7 years ago

gaetandezeiraud commented 7 years ago

Steps to Reproduce:

  1. Use this simple code : ` String* tempHighScore = String::createWithFormat("Démarrer");

    m_pBestScoreLabel = Label::createWithTTF(tempHighScore->getCString(), "fonts/arial.ttf", 42.0f); m_pBestScoreLabel->setColor(Color3B::WHITE); m_pBestScoreLabel->setPosition(Vec2( visibleSize.width / 2 + origin.x, visibleSize.height / 2 + origin.y + 230)); this->addChild(m_pBestScoreLabel, 10); `

  2. The text does not appear at all. Same problem with the default arial.ttf file and others like Roboto.ttf with accent in the TTF file. Here for french but same problem with spanish "Repetición" for example.

Thank you for your help.

perminovVS commented 7 years ago

Some of my players also have a similar problem, on Win32 and Android.