You can create the labels that use the fonts of the host operating system; therefore, you would not be required to provide a font file. It is recommended that you use this kind of label only for testing purposes, since it would decrease the framework's flexibility because the selected font may not be available on the user's Android operating system version.
Just for the sake of testing, below our current text, we will add the following label in the
init method of the
GameOverScene.cpp implementation file:
auto label2 = Label::createWithSystemFont("Your score is", "Arial", 48); label2->setPosition(origin.x + visibleSize.width/2,origin.y + visibleSize.height /2.5); this->addChild(label2, 1);
This code yields the following result: ...