diff options
Diffstat (limited to 'modules/pdp_text.c')
-rw-r--r-- | modules/pdp_text.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/pdp_text.c b/modules/pdp_text.c index 187c038..24b4c3e 100644 --- a/modules/pdp_text.c +++ b/modules/pdp_text.c @@ -34,7 +34,7 @@ #include <Imlib2.h> // imlib2 is required #define DEFAULT_CAPACITY 10 -#define DEFAULT_FONT "helmetr/16" +#define DEFAULT_FONT "Vera/16" static char *pdp_text_version = "pdp_text: version 0.2 : text rendering object written by ydegoyon@free.fr"; @@ -635,12 +635,20 @@ void pdp_text_setup(void) class_addmethod(pdp_text_class, (t_method)pdp_text_blend, gensym("blend"), A_DEFFLOAT, A_NULL); class_addmethod(pdp_text_class, (t_method)pdp_text_antialias, gensym("antialias"), A_DEFFLOAT, A_NULL); - imlib_add_path_to_font_path("/usr/X11R6/lib/X11/fonts/TTF"); +#ifdef __APPLE__ + imlib_add_path_to_font_path("/System/Library/Fonts"); + imlib_add_path_to_font_path("/Library/Fonts"); + imlib_add_path_to_font_path("/sw/share/imlib2/data/fonts"); + imlib_add_path_to_font_path("/sw/lib/X11/fonts/msttf"); +#else + imlib_add_path_to_font_path("/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"); +#endif font = imlib_load_font(DEFAULT_FONT); if ( !font ) { post( "pdp_text : severe error : could not load default font : no rendering !!!" ); + post( "pdp_text : try installing Bitstream Vera (http://www.gnome.org/fonts/)" ); } imlib_context_set_font( font ); } |