Skip to content

Commit 7ea5053

Browse files
committed
Fix Write() stroke width to scale with font_size or object scale
1 parent 2147f8f commit 7ea5053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manim/animation/creation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ def _adjust_stroke_width_for_text(
388388
return stroke_width
389389
if not isinstance(vmobject, SVGMobject):
390390
return 2.0 # default in DrawBorderThenFill
391-
font_size = DEFAULT_FONT_SIZE
392-
return (font_size / DEFAULT_FONT_SIZE) * DEFAULT_STROKE_WIDTH * scale_factor
391+
font_size = getattr(vmobject, "font_size", DEFAULT_FONT_SIZE)
392+
return 2
393393

394394
def reverse_submobjects(self) -> None:
395395
self.mobject.invert(recursive=True)

0 commit comments

Comments
 (0)