… | |
… | |
47 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
47 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
48 | OUTPUT: |
48 | OUTPUT: |
49 | RETVAL |
49 | RETVAL |
50 | |
50 | |
51 | void |
51 | void |
|
|
52 | add_font (char *file) |
|
|
53 | CODE: |
|
|
54 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
|
|
55 | |
|
|
56 | void |
52 | set_font (char *file) |
57 | set_font (char *file) |
53 | CODE: |
58 | CODE: |
54 | { |
59 | { |
55 | int count; |
60 | int count; |
56 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); |
61 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); |
57 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
|
|
58 | PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0); |
62 | PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0); |
59 | FcPatternDestroy (pattern); |
63 | FcPatternDestroy (pattern); |
60 | pango_context_set_font_description (context, font); |
64 | pango_context_set_font_description (context, font); |
61 | } |
65 | } |
|
|
66 | |
|
|
67 | MODULE = Crossfire::Client PACKAGE = Crossfire::Client |
62 | |
68 | |
63 | void |
69 | void |
64 | font_render (SV *text_, int height = 10) |
70 | font_render (SV *text_, int height = 10) |
65 | PPCODE: |
71 | PPCODE: |
66 | { |
72 | { |