Re: Font problems in Gtk-1.2.1

Dov Grobgeld <> writes:

> Hello,
> I just updated to RedHat 6.0 and as a part of that from Gtk-1.1.15 to
> Gtk+-1.2.1. . 
> Unfortunately this upgrade caused the following code which worked
> in 1.1.15 to not display the Hebrew characters \354 and \371 to
> be displayed anymore.
>     font = gdk_font_load("-*-web-*-*-*-*-*-240-*-*-*-*-*-8");
>     gdk_draw_string(drawing_area->window,
> 	  	    font,
> 		    gc,
> 		    x,y,"ab\354\371");
> When running this code only "ab" is drawn in Gtk+-1.2.1 .

Hrmmm, I don't have that particular font, but the 
following program with a slightly different font works
for me.


#include <gtk/gtk.h>

GdkFont *font;

expose (GtkWidget *widget)
  gdk_draw_string (widget->window,
		   0, 100, "ab\354\371");
  return TRUE;

int main (int argc, char **argv)
  GtkWidget *window;

  gtk_init (&argc, &argv);

  font = gdk_font_load ("-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-8");

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_app_paintable (window, TRUE);

  gtk_signal_connect (GTK_OBJECT (window), "expose_event",
		      GTK_SIGNAL_FUNC (expose), NULL);
  gtk_widget_show_all (window);
  gtk_main ();
  return 0;

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