| Summary: | SDL2_TTF TTF_OpenFont couldn't load font file: Fedora 19 | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | voidtype |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | yohann.ferreira |
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Hi there, For info, this bug looks similar to: https://bugzilla.libsdl.org/show_bug.cgi?id=2127 It seems the following patch may have fixed the problem: http://hg.libsdl.org/SDL_ttf/rev/86aa91bce20c Hopefully this will help you. Best regards, If this is the font you're trying to load, this works fine with the latest SDL_ttf release: http://www.dafont.com/lazy.font If not, please reopen the bug and attach the font for diagnosis. Thanks! |
Hoping that I've just made a silly mistake in my code. Trying to open up a TTF file, lazy.ttf on Fedora 19. if(TTF_Init() == -1) std::cout << "TTF failed to initialize." << std::endl; TTF_Font *f = TTF_OpenFont("lazy.ttf", 22); if(f == nullptr) std::cout << TTF_GetError() << std::endl; This code works for me fine on Windows 8, however it doesn't work for me on Fedora 19, giving me the error "Couldn't load font file.". I have the font file in the correct directory and I've scoured the internet in an attempt to find a solution to no avail. My project is in codeblocks and everything is linked correctly to my knowledge. Sorry if this isn't a bug and is just a mistake on my end. Thanks