diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.py index 74751d92e0..386f9433c4 100644 --- a/manim/mobject/svg/text_mobject.py +++ b/manim/mobject/svg/text_mobject.py @@ -5,7 +5,7 @@ import cairo from ...constants import * -from ...config import config +from ...config import config,file_writer_config from ...container.container import Container from ...logger import logger from ...mobject.geometry import Dot, Rectangle @@ -96,7 +96,7 @@ def __init__(self, text, **config): def get_space_width(self): size = self.size * 10 - dir_name = config['text_dir'] + dir_name = file_writer_config['text_dir'] file_name = os.path.join(dir_name, "space") + '.svg' surface = cairo.SVGSurface(file_name, 600, 400) @@ -291,8 +291,7 @@ def text2svg(self): if self.font == '': if NOT_SETTING_FONT_MSG != '': logger.warning(NOT_SETTING_FONT_MSG) - - dir_name = config['text_dir'] + dir_name = file_writer_config['text_dir'] hash_name = self.text2hash() file_name = os.path.join(dir_name, hash_name)+'.svg' if os.path.exists(file_name): diff --git a/tests/testing_utils.py b/tests/testing_utils.py index f8651de969..cf6d96bd74 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -38,7 +38,7 @@ def __init__(self, scene_object, module_tested, caching_needed=False): self.path_tests_data = os.path.join('tests', 'tests_data', module_tested) if caching_needed: - config['text_dir'] = os.path.join( + file_writer_config['text_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Text') file_writer_config['tex_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Tex')