Closed ibilon closed 9 years ago
Does it work to return alloc_null ();
in these cases?
When does it return null?
It enters the FONTS case https://github.com/openfl/lime/blob/master/project/src/backend/sdl/SDLSystem.cpp#L95 but since I'm on linux it falls through and return 0 https://github.com/openfl/lime/blob/master/project/src/backend/sdl/SDLSystem.cpp#L155
returning alloc_null works.
Oh, that's a mistake. It should probably return "/usr/fonts"?
Seems to be dependent of the distribution, from what I could see most of them put the fonts in /usr/share/fonts/
.
On my openSUSE it's a lot of directories and a lot of fonts in /usr/share/fonts/truetype
.
On a debian I have access /usr/share/fonts/truetype
is full of directories, some ttf in /usr/share/fonts/truetype/freefont/
.
Yeah, let's probably use /usr/share/fonts/truetype as the standard return
Confirmed on Ubuntu for /usr/share/fonts/truetype
Should be fixed now, thanks guys :smile:
Trying to run the HaxePunk sample result in a segfault, I looked into it and found out that
System::GetDirectory
returns 0, whichalloc_string
don't like.https://github.com/openfl/lime/blob/master/project/src/ExternalInterface.cpp#L595
returning
alloc_string("")
when that's the case seems to fix the problem.