Przeglądaj źródła

text: Give default font a default name

This is mostly so that the texture gets a name other than "_0"
rdb 4 tygodni temu
rodzic
commit
3d3c2e7b7c
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      panda/src/text/textProperties.cxx

+ 4 - 0
panda/src/text/textProperties.cxx

@@ -489,4 +489,8 @@ load_default_font() {
 
 #endif  // HAVE_FREETYPE
 #endif  // COMPILE_IN_DEFAULT_FONT
+
+  if (_default_font != nullptr && !_default_font->has_name()) {
+    _default_font->set_name("default_font");
+  }
 }