ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.8 by root, Sun Apr 9 01:19:15 2006 UTC vs.
Revision 1.9 by root, Sun Apr 9 01:35:40 2006 UTC

34 RETVAL = (char *)glGetString (GL_EXTENSIONS); 34 RETVAL = (char *)glGetString (GL_EXTENSIONS);
35 OUTPUT: 35 OUTPUT:
36 RETVAL 36 RETVAL
37 37
38void 38void
39add_font (char *file) 39set_font (char *file)
40 CODE: 40 CODE:
41 FcConfigAppFontAddFile (0, (const FcChar8 *)file);
42
43void
44set_font (char *pango_font)
45 CODE:
46{ 41{
42 int count;
43 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count);
44 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */
47 PangoFontDescription *font = pango_font_description_from_string (pango_font); 45 PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern);
46 FcPatternDestroy (pattern);
48 pango_context_set_font_description (context, font); 47 pango_context_set_font_description (context, font);
49} 48}
50 49
51void 50void
52font_render (SV *text_, int height = 10) 51font_render (SV *text_, int height = 10)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines