File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -386,10 +386,15 @@ def _adjust_stroke_width_for_text(
386
386
) -> float :
387
387
if stroke_width is not None :
388
388
return stroke_width
389
- font_size = getattr (vmobject , "font_size" , DEFAULT_FONT_SIZE )
390
- if font_size < 20 or font_size > 6 * DEFAULT_FONT_SIZE :
391
- # Assuming the user is using MovingCameraScene and performing a zoom-in or zoom-out
392
- return (font_size / DEFAULT_FONT_SIZE ) * DEFAULT_STROKE_WIDTH * scale_factor
389
+ if vmobject .height != 0 :
390
+ font_size = getattr (vmobject , "font_size" , DEFAULT_FONT_SIZE )
391
+ if font_size < 20 or font_size > 6 * DEFAULT_FONT_SIZE :
392
+ # Assuming the user is using MovingCameraScene and performing a zoom-in or zoom-out
393
+ return (
394
+ (font_size / DEFAULT_FONT_SIZE )
395
+ * DEFAULT_STROKE_WIDTH
396
+ * scale_factor
397
+ )
393
398
return 2 # default in DrawBorderThenFill
394
399
395
400
def reverse_submobjects (self ) -> None :
You can’t perform that action at this time.
0 commit comments