Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 95909 Details for
Bug 142453
freetype: error rendering space character in mono mode (libsdl/sdl-tff crashes)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
foo.c
foo.c (text/plain), 945 bytes, created by
SpanKY
on 2006-09-03 21:39:35 UTC
(
hide
)
Description:
foo.c
Filename:
MIME Type:
Creator:
SpanKY
Created:
2006-09-03 21:39:35 UTC
Size:
945 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <SDL.h> >#include <SDL_ttf.h> > >#define menu_font "menu.ttf" >#define menu_font_size 20 > >#define warn(fmt...) fprintf(stderr, fmt) >#define err(fmt...) do { warn(fmt); exit(1); } while (0) > >int main() >{ > int i; > char *msgs[] = { "Fish", "Cascade", " " }; > TTF_Font *font; > SDL_Color black = { 0x00, 0x00, 0x00, 0x00}; > SDL_Surface *tmp; > > if (TTF_Init() != 0) > err("TTF_Init() failed: %s\n", TTF_GetError()); > > font = TTF_OpenFont(menu_font, menu_font_size); > if (font == NULL) > err("TTF_OpenFont(%s) failed: %s\n", menu_font, TTF_GetError()); > > for (i=0; i<sizeof(msgs)/sizeof(*msgs); ++i) { > tmp = TTF_RenderText_Solid(font, msgs[i], black); > if (tmp == NULL) { > warn("TTF_RenderText_Solid(%s) failed: %s\n", msgs[i], TTF_GetError()); > } else { > printf("TTF_RenderText_Solid(%s) worked!\n", msgs[i]); > SDL_FreeSurface(tmp); > } > } > > TTF_CloseFont(font); > > TTF_Quit(); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 142453
: 95909