Creating a label with SystemFont

I just realized I had been using “createWithSystemFont” in my game with a .ttf file, but everything is working as expected, is there anything different going on behind the scenes ? and should I change all my labels to createWithTTF ?

auto fourthlabel = Label::createWithSystemFont(“Level 1”, “fonts/Marker Felt.ttf”, 65);

Both methods should works ok: createWithSystemFont and createWithTTF
Often I use createWithSystemFont if i need a generic font that supports ALL languages (english, chinese, etc.). For example, if the variable text can be in all languages, i use:

Label::createWithSystemFont(text, "Arial", 14);

Because maybe my TTF file not supports all characters/languages.

2 Likes

I use ttf for English and system for generic also. @tranthor has the right idea :slight_smile:

in the book “Building android games with cocos2d-x” “Creating system fonts” it says “it is recommended you use this kind of label only for testing purposes, since it would decrease the frameworks flexibility because the selected font may not be available on the user’s Android” ???