from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parents[1] RUNTIME_DIR = BASE_DIR / ".runtime" MPL_CONFIG_DIR = RUNTIME_DIR / "matplotlib" RUNTIME_DIR.mkdir(parents=True, exist_ok=True) MPL_CONFIG_DIR.mkdir(parents=True, exist_ok=True) os.environ.setdefault("MPLCONFIGDIR", str(MPL_CONFIG_DIR)) ASSETS_DIR = BASE_DIR / "assets" FONTS_DIR = ASSETS_DIR / "fonts" PROJECT_DEFAULT_FONT = Path("assets/fonts/STHeiti Medium.ttc")