Index: clock.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/clock.c,v
retrieving revision 1.137
diff -u -r1.137 clock.c
--- clock.c	11 Mar 2004 15:02:50 -0000	1.137
+++ clock.c	17 Mar 2004 09:50:28 -0000
@@ -158,6 +158,9 @@
 
 static void update_clock (ClockData * cd);
 
+static void update_clock_font_size (ClockData * cd);
+
+
 static void set_atk_name_description (GtkWidget *widget,
                                       const char *name,
                                       const char *desc);
@@ -384,6 +387,7 @@
 	}
 
 	utf8 = g_locale_to_utf8 (hour, -1, NULL, NULL, NULL);
+	update_clock_font_size (cd);
 	gtk_label_set_text (GTK_LABEL (cd->clockw), utf8);
 	g_free (utf8);
 
@@ -1385,6 +1389,29 @@
 }
 
 static void
+update_clock_font_size (ClockData *cd)
+{
+	PangoFontDescription *font_desc;
+	gint font_factor;
+	
+	font_factor =  10; 			/* by trial & error */
+	if (cd->size <= 80 && cd->size >= 65) font_factor = 8;
+	if (cd->size <= 64 && cd->size >= 49) font_factor = 6;
+	if (cd->size <= 48 && cd->size >= 37) font_factor = 4;
+	if (cd->size <= 36 && cd->size >= 25) font_factor = 3;
+	if (cd->size <= 24 && cd->size >= 13) font_factor = 2;
+	if (cd->size < 13 ) font_factor = 1;
+
+	if (cd->orient == PANEL_APPLET_ORIENT_LEFT || cd->orient == PANEL_APPLET_ORIENT_RIGHT)
+	{	
+		font_desc = pango_font_description_new ();
+		pango_font_description_set_size (font_desc, PANGO_SCALE * font_factor );
+		gtk_widget_modify_font (GTK_LABEL (cd->clockw), font_desc); 
+	}
+}
+
+
+static void
 create_clock_widget (ClockData *cd)
 {
 	GtkWidget *clock;
