浏览代码

break out of font search loop after first match

The documentation for the font_names property indicates:

   Array of font family names to search, first matching font found is used.
danboo 3 年之前
父节点
当前提交
14ddeb8e44
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scene/resources/font.cpp

+ 2 - 0
scene/resources/font.cpp

@@ -2808,6 +2808,8 @@ void SystemFont::_update_base_font() {
 		file->set_oversampling(oversampling);
 
 		base_font = file;
+
+		break;
 	}
 
 	if (base_font.is_valid()) {