Files
2026-07-04 02:40:45 +08:00

15 lines
450 B
Python

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")