Re: [Anjuta-list] Editor widget not antialiased



I did hack it little so that editor uses AA fonts. Basically problem is we 
are not passing fontspec correctly to scintilla editor. I have attached
patch that you might want to apply to anjuta source and see if it works
for you.

- Rick

On Monday 10 December 2001 05:40 pm, Manuel Clos wrote:
> Luciano Chavez wrote:
> > I use gdkxft as well and Anjuta editor fonts come out anti-aliased. I
> > use the "Lucida console" on one machine and "Quicktype mono" on another.
> > It works great.
> >
> > Try using the same font that Glimmer uses. Check that Anjuta is indeed
> > linking with libgdkxft.so with `ldd /usr/bin/anjuta` command.
>
> llanero llanero:~$ ldd /usr/bin/anjuta
> 	/usr/lib/libgdkxft.so => /usr/lib/libgdkxft.so (0x40014000)
>
> yes, in fact the menus are antialiased, it's just the editor widget
> which is not antialiased.
>
> When selecting the font I see it antialiased, but when applied it shows
> without aa.
Index: preferences_gui.c
===================================================================
RCS file: /cvs/gnome/anjuta/src/preferences_gui.c,v
retrieving revision 1.7
diff -u -u -r1.7 preferences_gui.c
--- preferences_gui.c	2001/10/14 11:10:54	1.7
+++ preferences_gui.c	2001/11/24 23:29:06
@@ -1915,6 +1915,7 @@
 		{
 			style_data_set_font (p->current_style, p->default_style->font);
 		}
+
 		p->current_style->size =
 			gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON
 							  (p->widgets.
@@ -2328,16 +2329,24 @@
 	state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tb));
 	if (state)
 	{
-		font_name = g_strdup_printf ("-*-%s-*-*-*-*-%d-*-*-*-*-*-*-*-", 
-			p->default_style->font, p->default_style->size);
+		if (p->default_style->font[0] != '-')
+			font_name = g_strdup_printf ("-*-%s-*-*-*-*-%d-*-*-*-*-*-*-*-", 
+				p->default_style->font, p->default_style->size);
+		else
+			font_name = g_strdup_printf("%s",p->default_style->font);
+			
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON
 			(p->widgets.font_size_spin),
 			p->default_style->size);
 	}
 	else
 	{
-		font_name = g_strdup_printf ("-*-%s-*-*-*-*-%d-*-*-*-*-*-*-*-", 
-			p->current_style->font, p->current_style->size);
+		if (p->default_style->font[0] != '-')
+			font_name = g_strdup_printf ("-*-%s-*-*-*-*-%d-*-*-*-*-*-*-*-", 
+				p->default_style->font, p->default_style->size);
+		else
+			font_name = g_strdup_printf("%s",p->default_style->font);
+
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON
 					   (p->widgets.font_size_spin),
 					   p->current_style->size);
@@ -2347,8 +2356,9 @@
 		gtk_widget_set_sensitive (p->widgets.font_picker, FALSE);
 		gtk_widget_set_sensitive (p->widgets.font_size_spin, FALSE);
 	}
+	
 	gnome_font_picker_set_font_name (GNOME_FONT_PICKER (p->widgets.font_picker),
-		font_name);
+			font_name);
 }
 
 static void
@@ -2471,11 +2481,7 @@
 fontpicker_get_font_name (GtkWidget *gnomefontpicker,
                                         gchar** font)
 {
-	gchar *font_name;
-	
-	font_name = gnome_font_picker_get_font_name (GNOME_FONT_PICKER(gnomefontpicker));
-	g_return_val_if_fail (font_name != NULL, FALSE);
-	*font = font_get_nth_field (font_name, 1);
+	*font = g_strdup(gnome_font_picker_get_font_name (GNOME_FONT_PICKER(gnomefontpicker)));
 	if (*font == NULL)
 		return FALSE;
 	return TRUE;


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