| Summary: | Couldn't load font file when use the latest version of SDL 1.3 on Android | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | Mike Chen <mikeyiy> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | unspecified | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
Your problem sounds exactly like the bug in #1301, which was fixed a few days ago (changeset c9cb52d6d864), can you confirm you have that patch incorporated? (In reply to comment #1) > Your problem sounds exactly like the bug in #1301, which was fixed a few days > ago (changeset c9cb52d6d864), can you confirm you have that patch incorporated? Yes,it's what I really want! Thanks a lot. |
the latest SDL 1.3 download from HG allow user read resource from assets by JNI. I test it is OK in SDL_Image, but it does not compliant with SDL_ttf. When use the function of TTF_OpenFont*() it reports error of "Couldn't load font file". I trace the source code find "SDL_RWops *rw = SDL_RWFromFile(file, "rb");" seems no problem. but in TTF_Font* TTF_OpenFontIndexRW( SDL_RWops *src, int freesrc, int ptsize, long index ) ... error = FT_Open_Face( library, &font->args, index, &font->face ); if( error ) { TTF_SetFTError( "Couldn't load font file", error ); TTF_CloseFont( font ); return NULL; } it returns NULL I have no idea what wrong in FT_Open_Face.