pupil-labs / pyglui

cython powered OpenGL gui that works with glfw
MIT License
29 stars 20 forks source link

Resolve font path sym links #147

Closed papr closed 1 year ago

papr commented 1 year ago
 Traceback (most recent call last):
   File "launchables/eye.py", line 591, in eye
   File "src/pyglui/graph.pyx", line 47, in pyglui.graph.Bar_Graph.__cinit__
   File "src/pyglui/pyfontstash/fontstash.pyx", line 43, in pyglui.pyfontstash.fontstash.Context.add_font
 Exception: Font could not be loaded from '/Applications/Pupil Capture.app/Contents/MacOS/pyglui/OpenSans-Regular.ttf'.

When bundling pyglui on macOS, PyInstaller copies the font files to Contents/Resources/pyglui and places a sym link in Contents/MacOS/pyglui. pyfontstash is not able to resolve the sym link by itself, i.e. pyglui needs to perform this action instead.