aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-24 00:36:04 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-24 00:36:04 +0000
commitf9011320e157f5226f8605302f5710f8e5eb1a9f (patch)
tree663550a31e2e7b5fd8b59114342d1fc7111514d9
parent0a1363d8ba7f0420e834c549bb583474ef3ddbf6 (diff)
switched default font to Bitstream Vera, since it's free and added more font paths where most fonts live
svn path=/trunk/externals/pidip/; revision=8222
-rwxr-xr-xmodules/pdp_qtext.c13
-rw-r--r--modules/pdp_text.c12
2 files changed, 21 insertions, 4 deletions
diff --git a/modules/pdp_qtext.c b/modules/pdp_qtext.c
index dbab3e3..1d76912 100755
--- a/modules/pdp_qtext.c
+++ b/modules/pdp_qtext.c
@@ -37,7 +37,8 @@
#include <Imlib2.h> // imlib2 is required
#define DEFAULT_CAPACITY 10
-#define DEFAULT_FONT "helmetr/16"
+
+#define DEFAULT_FONT "Vera/16"
#define PIDIP_TEXT_MODE_STATIC 0
#define PIDIP_TEXT_MODE_SCROLL 1
@@ -1071,12 +1072,20 @@ void pdp_qtext_setup(void)
class_addmethod(pdp_qtext_class, (t_method)pdp_qtext_direction, gensym("direction"), A_DEFFLOAT, A_NULL);
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 );
}
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 );
}