Skip to content

Commit 4ddf777

Browse files
AbhilashaTandonbehacklchopan050
authored
Include Text.gradient in hash to properly regenerate Text when its gradient changes (#4099)
Co-authored-by: Benjamin Hackl <[email protected]> Co-authored-by: Francisco Manríquez Novoa <[email protected]>
1 parent e73b659 commit 4ddf777

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manim/mobject/text/text_mobject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ def _text2hash(self, color: ManimColor):
678678
settings += str(self.t2f) + str(self.t2s) + str(self.t2w) + str(self.t2c)
679679
settings += str(self.line_spacing) + str(self._font_size)
680680
settings += str(self.disable_ligatures)
681+
settings += str(self.gradient)
681682
id_str = self.text + settings
682683
hasher = hashlib.sha256()
683684
hasher.update(id_str.encode())
@@ -1561,7 +1562,7 @@ def register_font(font_file: str | Path):
15611562
logger.debug("Found file at %s", file_path.absolute())
15621563
break
15631564
else:
1564-
error = f"Can't find {font_file}.Tried these : {possible_paths}"
1565+
error = f"Can't find {font_file}. Checked paths: {possible_paths}"
15651566
raise FileNotFoundError(error)
15661567

15671568
try:

0 commit comments

Comments
 (0)