Label issue after upgrade to 3.17

I’ve encountered a problem when upgrading my app from cocos 3.12 to 3.17. One of my labels sometimes breaks down or disappear completely. Here are screens:

This problems appears only on one of my testing devices: Lenovo B6000-F (Android 4.4.2 API 19). I haven’t seen this issue on others devices including simulator.
I create the label like this: Label::createWithTTF("", “myFont.ttf”, 20). During the game text of this label is updated to 4 or 5 lines of text. Besides, label position is changed by actions.

When I change creation of label to: Label::createWithSystemFont("", “myFont.ttf”, 20) the issue is gone and everything seems good. So here are my questions:

  1. It is safe to use Label::createWithSystemFont with my custom font “myFont.ttf”? It is placed in Resources directory. It seems to work on all my devices, but can I be sure it will work everywhere?

  2. Any clue about this issue itself?

My development environment:
Android Studio 3.1.4
Android SDK Build-Tools 28.0.2
NDK 18.0.5002713
Gradle 4.4
PROP_COMPILE_SDK_VERSION=27

My first idea is to rename the font to a lower case filename. Don’t know if this helps, but it’s always a good practice to do it (at least for Android).

1 Like

My ideas:

  1. Check ndk16
  2. Check latest version from github
1 Like

Thanks for the replies. In fact the font name is lowercase. In my first post I use sample font name. I’ll check ndk16 in first place. Thanks for advices again.

I have filling that latest github version especially this pull request https://github.com/cocos2d/cocos2d-x/pull/19013 + ndk16 may solve your problem.

Unfortunately it doesn’t solve my problem. Can anybody say something about changing “createWithTTF” to "createWithSystemFont "? It is good idea?