Update of /cvsroot/pure-data/externals/pidip/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20289
Modified Files: pdp_qtext.c pdp_text.c Log Message: switched default font to Bitstream Vera, since it's free and added more font paths where most fonts live
Index: pdp_qtext.c =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_qtext.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pdp_qtext.c 10 May 2007 23:01:30 -0000 1.3 --- pdp_qtext.c 24 Jul 2007 00:36:04 -0000 1.4 *************** *** 38,42 ****
#define DEFAULT_CAPACITY 10 ! #define DEFAULT_FONT "helmetr/16"
#define PIDIP_TEXT_MODE_STATIC 0 --- 38,43 ----
#define DEFAULT_CAPACITY 10 ! ! #define DEFAULT_FONT "Vera/16"
#define PIDIP_TEXT_MODE_STATIC 0 *************** *** 1072,1081 **** class_addmethod(pdp_qtext_class, (t_method)pdp_qtext_mode, gensym("layermode"), A_SYMBOL, A_NULL);
- imlib_add_path_to_font_path("/usr/X11R6/lib/X11/fonts/TTF"); font = imlib_load_font(DEFAULT_FONT); if ( !font ) { post( "pdp_qtext : severe error : could not load default font : no rendering !!!" ); } imlib_context_set_font( font ); --- 1073,1090 ---- class_addmethod(pdp_qtext_class, (t_method)pdp_qtext_mode, gensym("layermode"), A_SYMBOL, 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_qtext : 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 );
Index: pdp_text.c =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_text.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pdp_text.c 10 May 2007 23:01:30 -0000 1.6 --- pdp_text.c 24 Jul 2007 00:36:04 -0000 1.7 *************** *** 35,39 ****
#define DEFAULT_CAPACITY 10 ! #define DEFAULT_FONT "helmetr/16"
static char *pdp_text_version = "pdp_text: version 0.2 : text rendering object written by ydegoyon@free.fr"; --- 35,39 ----
#define DEFAULT_CAPACITY 10 ! #define DEFAULT_FONT "Vera/16"
static char *pdp_text_version = "pdp_text: version 0.2 : text rendering object written by ydegoyon@free.fr"; *************** *** 636,645 **** 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"); font = imlib_load_font(DEFAULT_FONT); if ( !font ) { post( "pdp_text : severe error : could not load default font : no rendering !!!" ); } imlib_context_set_font( font ); --- 636,653 ---- 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 );