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