libtcod / python-tcod

A high-performance Python port of libtcod. Includes the libtcodpy module for backwards compatibility with older projects.
BSD 2-Clause "Simplified" License
410 stars 36 forks source link

console_set_custom_font can't find font file #55

Closed ryfactor closed 5 years ago

ryfactor commented 5 years ago

I think you inadvertently created a bug at python-tcod/0c924a3

Windows 8 python 3.6. I installed tcod as per instructions on this repo, via pycharm.

I was just following along with a popular tutorial when I came accross the bug. http://rogueliketutorials.com/libtcod/1

HexDecimal commented 5 years ago

I'll need to see some of your error output to know what's going on.

The installation instructions should give you the latest release (7.0.1), but the commit you mentioned hasn't been released yet.

ryfactor commented 5 years ago

Hmm, I see. Maybe the commit patches my problem? The earliest I can get back to you is Monday next week. I'll check the error message and version then :)

HexDecimal commented 5 years ago

There's a frequent issue where people try to load the font file relative to the current Python module, but you're supposed to load the file relative to the working directory. That patch clarifies things by printing the full path of the file if it doesn't exist at the given location.

HexDecimal commented 5 years ago

I've released a new version with the patch. You should still get an error but it should be more clear what's going wrong.

If you get any error other than the full path of the file then that'd mean something in libtcod was recently broken, or that the font file itself is corrupt.

ryfactor commented 5 years ago

I'm terribly sorry, I have got my wires crossed. I'm using the setup from Roguebasin which uses the bitbucket C++ version of libtcod. Turns out I was missing libwinpthread-1.dll, which I grabbed from the bin folder of my msys2 64bit install.

Sorry for the confusion. I should've known the difference based from the presence of the dlls :( Will there be a roguelike tutorial based on python-tcod in future?

HexDecimal commented 5 years ago

I'm not sure when there will be a new tutorial, but you can still use any libtcodpy tutorial with python-tcod once it's installed.