diff --git a/cocos/platform/android/CCDevice-android.cpp b/cocos/platform/android/CCDevice-android.cpp index f18c4cd7f0..ccc4b43967 100644 --- a/cocos/platform/android/CCDevice-android.cpp +++ b/cocos/platform/android/CCDevice-android.cpp @@ -114,7 +114,7 @@ public: int count = strlen(text); jbyteArray strArray = methodInfo.env->NewByteArray(count); methodInfo.env->SetByteArrayRegion(strArray, 0, count, reinterpret_cast(text)); - jstring jstrFont = methodInfo.env->NewStringUTF(fullPathOrFontName.c_str()); + jstring jstrFont = methodInfo.env->NewStringUTF(fullPathOrFontName.empty() ? textDefinition._fontName.c_str() : fullPathOrFontName.c_str()); if(!methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID, strArray, jstrFont, textDefinition._fontSize, textDefinition._fontFillColor.r, textDefinition._fontFillColor.g, diff --git a/tests/cpp-tests/Resources/ccs-res b/tests/cpp-tests/Resources/ccs-res index fab8c569a8..50f82c2e07 160000 --- a/tests/cpp-tests/Resources/ccs-res +++ b/tests/cpp-tests/Resources/ccs-res @@ -1 +1 @@ -Subproject commit fab8c569a8f27a2ff7c1150c22507d727efe5c17 +Subproject commit 50f82c2e0736d127e0b58fef0d8b773af90a7f3d diff --git a/tests/js-tests/src/FontTest/FontTest.js b/tests/js-tests/src/FontTest/FontTest.js index fe65ef667b..57f1e2411e 100644 --- a/tests/js-tests/src/FontTest/FontTest.js +++ b/tests/js-tests/src/FontTest/FontTest.js @@ -33,6 +33,8 @@ var fontIdx = 0; var fontList = [ // System Fonts + "sans-serif", + "sans-serif-light", "Verdana", "Lucida Sans Unicode", "Bookman Old Style",