Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

Label: system font vs TTF

$
0
0

@MikhailSh wrote:

What is better to use for Label:

label->setSystemFontName("fontName");

or

label->setTTFConfig(ttfConfig);

If i understood correctly,
in first case:
- cocos2d-x will generate texture that contains the whole text;
- it's not allowed to manipulate individual letters;
- texture will be freed once label is deallocated;

in second case:
- cocos2d-x will generate FNT atlas, where each symbol occurs only once;
- we can manipulate individual letters;
- texture will be cached;

So at first glance looks like using TTF is better:
- it should use less memory;
- due to cache it should work faster. Though it may contain too many vertices for the long text.

What do you think? What other benefits gives each of these approaches?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles