浏览代码

[Bitmap font] Assume outline size is `1` if it's not set, but channel for outline is defined.

bruvzg 2 年之前
父节点
当前提交
67762ec4a6
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      scene/resources/font.cpp

+ 6 - 0
scene/resources/font.cpp

@@ -1458,6 +1458,9 @@ Error FontFile::load_bitmap_font(const String &p_path) {
 						}
 						if (ch[i] == 1 && first_ol_ch == -1) {
 							first_ol_ch = i;
+							if (outline == 0) {
+								outline = 1;
+							}
 						}
 						if (ch[i] == 2 && first_cm_ch == -1) {
 							first_cm_ch = i;
@@ -1747,6 +1750,9 @@ Error FontFile::load_bitmap_font(const String &p_path) {
 					}
 					if (ch[i] == 1 && first_ol_ch == -1) {
 						first_ol_ch = i;
+						if (outline == 0) {
+							outline = 1;
+						}
 					}
 					if (ch[i] == 2 && first_cm_ch == -1) {
 						first_cm_ch = i;