Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions manim/mobject/svg/text_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down