File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ def construct(self):
94
94
from ..animation .animation import Animation
95
95
from ..animation .composition import Succession
96
96
from ..mobject .mobject import Group , Mobject
97
- from ..mobject .svg .svg_mobject import SVGMobject
98
97
from ..mobject .types .vectorized_mobject import VMobject
99
98
from ..utils .bezier import integer_interpolate
100
99
from ..utils .rate_functions import double_smooth , linear
@@ -386,9 +385,9 @@ def _adjust_stroke_width_for_text(
386
385
) -> float :
387
386
if stroke_width is not None :
388
387
return stroke_width
389
- if not isinstance (vmobject , SVGMobject ) or vmobject .height == 0 :
388
+ if not hasattr (vmobject , "font_size" ) or vmobject .height == 0 :
390
389
return 2
391
- font_size = getattr ( vmobject , " font_size" , DEFAULT_FONT_SIZE )
390
+ font_size = vmobject . font_size
392
391
if font_size < 20 or font_size > 6 * DEFAULT_FONT_SIZE :
393
392
# adjust stroke_width if font_size is too small or too big
394
393
return (font_size / DEFAULT_FONT_SIZE ) * DEFAULT_STROKE_WIDTH * scale_factor
You can’t perform that action at this time.
0 commit comments