diff options
author | danboo <dan@boorstein.net> | 2022-08-15 20:58:48 -0800 |
---|---|---|
committer | danboo <dan@boorstein.net> | 2022-08-15 20:58:48 -0800 |
commit | 14ddeb8e445b934ce939c804214efb193ad3ec0b (patch) | |
tree | 329a4cf10a3a85049ba6ea6676ff0592a11de670 | |
parent | d5d22ab035a611a567f73a2ee2d61a81c99c61b5 (diff) |
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.
-rw-r--r-- | scene/resources/font.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 619036d296..880876baed 100644 --- a/scene/resources/font.cpp +++ b/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()) { |