pupil-labs / pyglui

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

Font loading fails if font directory has unicode characters #44

Closed papr closed 6 years ago

papr commented 7 years ago

Well, bad news, @willpatera. This is an Windows problem only. It seems that fopen on Windows cannot handle utf-8 encoded char*... fopen call in fontstash

On Ubuntu, Pupil Capture loads font with unicode directories without problems.

willpatera commented 7 years ago

@papr did you review docs here 👉 https://msdn.microsoft.com/en-us/library/yeby3zcb.aspx#Anchor_3

mkassner commented 7 years ago

So this is actually a https://github.com/memononen/fontstash issue . So I just made one: https://github.com/memononen/fontstash/issues/28

A note on attempting to fix this: We dont need to load a unicode file. We actually need to load a file with a unicode name/path -> world of pain: http://stackoverflow.com/questions/21402742/fopen-with-unicode-filename

This looks like something we should contract IMHO.

mkassner commented 7 years ago

OK. I guess the task is to make a PR to fontstash and add this: https://github.com/Wohlstand/UTF8-fopen/blob/master/check.c

mkassner commented 6 years ago

this is fixed with https://github.com/memononen/fontstash/pull/37

this commit set the correct submodule version: f2c4529