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:
-
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?
-
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