mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15919 from zilongshanren/fix-android-system-fontname
fix system font creation on Android platform
This commit is contained in:
commit
324931a242
|
@ -114,7 +114,7 @@ public:
|
|||
int count = strlen(text);
|
||||
jbyteArray strArray = methodInfo.env->NewByteArray(count);
|
||||
methodInfo.env->SetByteArrayRegion(strArray, 0, count, reinterpret_cast<const jbyte*>(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,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit fab8c569a8f27a2ff7c1150c22507d727efe5c17
|
||||
Subproject commit 50f82c2e0736d127e0b58fef0d8b773af90a7f3d
|
|
@ -33,6 +33,8 @@ var fontIdx = 0;
|
|||
var fontList = [
|
||||
|
||||
// System Fonts
|
||||
"sans-serif",
|
||||
"sans-serif-light",
|
||||
"Verdana",
|
||||
"Lucida Sans Unicode",
|
||||
"Bookman Old Style",
|
||||
|
|
Loading…
Reference in New Issue