Skip to content

gen_signs.py: make the font directory overridable via THREERT_FONT_DIR - #75

Open
onebender137 wants to merge 1 commit into
meshy-dev:mainfrom
onebender137:fix/font-dir-env-var
Open

onebender137 wants to merge 1 commit into
meshy-dev:mainfrom
onebender137:fix/font-dir-env-var

Conversation

@onebender137

Copy link
Copy Markdown

Fixes the Linux half of #73.

tools/kabukicho/gen_signs.py hardcodes FONT_DIR = "/System/Library/Fonts", which raises OSError: cannot open resource on Linux. Because setup.ts runs its fetchers sequentially and throws on the first non-zero exit, that crash aborts setup before fetch-khronos.ts runs — so one font path also strands the Khronos scenes.

os.environ.get("THREERT_FONT_DIR", "/System/Library/Fonts") keeps the macOS default and lets other platforms point at their own fonts. Verified with Noto Serif/Sans JP: all 147 sign textures generate.

The stock path /System/Library/Fonts is macOS-only; on Linux the
Kabukicho sign generator crashes with 'cannot open resource'. Read an
optional THREERT_FONT_DIR env var, defaulting to the macOS path so
existing behaviour is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant