| Summary: | SDL_ttf (2.0.12) - Cannot load .fon file. (Couldn't set the font size). | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | Yohann Ferreira <yohann.ferreira> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | 2.0.12 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| URL: | https://github.com/christopho/zsdx/issues/59 | ||
| Attachments: | The .fon file. | ||
|
Description
Yohann Ferreira
2013-10-01 21:05:36 UTC
Hi again, More tests followed and the main upstream dev (christopho) told me that changing the .fon file to .ttf doesn't work after all. Sorry, for the counter-saying. I'll post a snippet testcase as soon as possible. Here is the gist of it:
#include "SDL_ttf.h"
#include <stdio.h>
int main(int /*argc*/, char ** /*argv*/)
{
if (TTF_Init() == -1) {
printf("TTF_Init: %s\n", TTF_GetError());
exit(2);
}
// load font.ttf at size 16 into font
TTF_Font *font;
font = TTF_OpenFont("./fixed8.fon", 16);
if (!font) {
printf("TTF_OpenFont: %s\n", TTF_GetError());
// handle error
exit(1);
}
TTF_CloseFont(font);
TTF_Quit();
}
Have you tried debugging SDL_ttf? As far as I know, nothing in SDL_ttf has changed that would affect that, we're just using a newer version of FreeType. Hi, :) Ack. I've requested some test on OSX. I'll do the same on Debian and will tell you whether we find something interesting for you. Regards, Just to say I'm still on it. Stay tuned. Hey, Seems the following bug is quite similar: https://bugzilla.libsdl.org/show_bug.cgi?id=2468 Also, it seems that this fix is related to the problem: http://hg.libsdl.org/SDL_ttf/rev/86aa91bce20c I'd like to build the latest SDL_ttf with the newest Freetype version to debug several issues I've opened here. Is there a reason you're still using FreeType 2.4.8? (Freetype 2.5.x has fixed several issues about glyph metrics, among other things...) Best regards, Bertram This is fixed in the latest SDL_ttf version. |