Browse Source

use hasattr instead of isinstance

David Rose 23 years ago
parent
commit
ec699adbee
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/showbase/Loader.py

+ 1 - 1
direct/src/showbase/Loader.py

@@ -165,7 +165,7 @@ class Loader:
             font = DynamicTextFont(fn, faceIndex)
             font = DynamicTextFont(fn, faceIndex)
 
 
         # The following properties may only be set for dynamic fonts.
         # The following properties may only be set for dynamic fonts.
-        if isinstance(font, DynamicTextFont):
+        if hasattr(font, "setPointSize"):
             if pointSize != None:
             if pointSize != None:
                 font.setPointSize(pointSize)
                 font.setPointSize(pointSize)
             if pixelsPerUnit != None:
             if pixelsPerUnit != None: