[monkey-bubble: 58/753] added font support. added a dash before db2{html|dvi|ps} to ignore errors.



commit ac7707dd032d9c511ed64296d9c7c8a88e43715d
Author: ART 1998  Horacio J. Peña <horape compendium com ar>
Date:   Wed Jan 28 00:17:03 1998 +0000

    added font support. added a dash before db2{html|dvi|ps} to ignore errors.
    
    Tue Jan 27 21:03:01 ART 1998  Horacio J. Peña  <horape compendium com ar>
    
            * libgnomeui/gnome-scores.c: (gnome_scores_set_logo_label): added font
              support.
            * programs/gnome-hello/Makefile.am: added a dash before
              db2{html|dvi|ps} to ignore errors.
            * programs/gnome-hello/gnome-hello.c: Gnomified.
            * programs/gnomine/gnomine.c: Disable i18n of fsize2names.

 libgnomeui/gnome-scores.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libgnomeui/gnome-scores.c b/libgnomeui/gnome-scores.c
index 7a7c881..a1655fd 100644
--- a/libgnomeui/gnome-scores.c
+++ b/libgnomeui/gnome-scores.c
@@ -179,6 +179,8 @@ void gnome_scores_set_logo_label (GnomeScores *gs, gchar *txt, gchar *font,
 {
 	GtkStyle *s = gtk_style_new(); /* i believe that i should copy the default style
 					  and change only the fg & font fields, how? */
+	GdkFont *f;
+	gchar *fo;
 
 	if(gs->logo) {
 		g_print("Warning: gnome_scores_set_logo_* can be called only once\n");
@@ -188,6 +190,14 @@ void gnome_scores_set_logo_label (GnomeScores *gs, gchar *txt, gchar *font,
 	if(col)
 		memcpy((void *) &s->fg[0], col, sizeof(GdkColor) );
 
+	if( font ) 
+		fo = font;
+	else 
+		fo = "-freefont-garamond-*-*-*-*-30-170-*-*-*-*-iso8859-1";
+
+	if( f = gdk_fontset_load ( fo ) )
+		s->font = f;
+
 	gs->logo = gtk_label_new(txt);
 	gtk_widget_set_style(GTK_WIDGET(gs->logo), s);
 	gtk_box_pack_end (GTK_BOX(gs->vbox), gs->logo, TRUE, TRUE, 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]