A community-maintained Python framework for creating mathematical animations.
Shortened the far too long message when no font is used, and about CairoText deprecation. Ran black
MysaaJava5292fc8912e3
diff --git a/docs/source/manim_directive.py b/docs/source/manim_directive.pyindex 4b8df6f4f..7c34657c8 100644--- a/docs/source/manim_directive.py+++ b/docs/source/manim_directive.py@@ -106,7 +106,7 @@ class ManimDirective(Directive):save_last_frame = "save_last_frame" in self.optionswrite_to_movie = not save_last_frameassert not (save_as_gif and save_last_frame)-+frame_rate = 30pixel_height = 480pixel_width = 854diff --git a/manim/constants.py b/manim/constants.pyindex 2f13f226e..63151a51b 100644--- a/manim/constants.py+++ b/manim/constants.py@@ -6,17 +6,6 @@ import numpy as np# Messages-NOT_SETTING_FONT_MSG = """-You haven't set font.-If you are not using English, this may cause text rendering problem.-You set font like:-text = Text('your text', font='your font')-or:-class MyText(Text):- CONFIG = {- 'font': 'My Font'- }-"""SCENE_NOT_FOUND_MESSAGE = """{} is not in the script"""diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.pyindex 906be3d17..63f73a37c 100644--- a/manim/mobject/svg/text_mobject.py+++ b/manim/mobject/svg/text_mobject.py@@ -307,8 +307,9 @@ class CairoText(SVGMobject):line_spacing = self.line_spacing * 10if self.font == "":- if NOT_SETTING_FONT_MSG:- logger.warning(NOT_SETTING_FONT_MSG)+ logger.warning(+ "You haven't set font, non-english characters may not be rendered"+ )dir_name = file_writer_config["text_dir"]if not os.path.exists(dir_name):@@ -934,8 +935,5 @@ class Text(CairoText):"""def __init__(self, text, **config):- logger.warning(- "Using Text uses Cairo Toy API to Render Text."- "Using PangoText is recommended and soon Text would point to PangoText"- )+ logger.warning("Text currently uses Cairo Toy API, but will soon use PangoText")CairoText.__init__(self, text, **config)diff --git a/manim/scene/scene_file_writer.py b/manim/scene/scene_file_writer.pyindex bb6906c91..bde2caaa8 100644--- a/manim/scene/scene_file_writer.py+++ b/manim/scene/scene_file_writer.py@@ -484,14 +484,14 @@ class SceneFileWriter(object)::class:`bool`Whether the file exists."""- if hasattr(self,'partial_movie_directory'):+ if hasattr(self, "partial_movie_directory"):path = os.path.join(self.partial_movie_directory,"{}{}".format(hash_invocation, self.movie_file_extension),)return os.path.exists(path)else:- return False # If there is no partial movie directory, then the file is not cached+ return False # If there is no partial movie directory, then the file is not cacheddef combine_movie_files(self):"""