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

gtk2 font troubles

i am having a really hard time with arabic fonts with gtk2...
when they're really small, they look fine, when they are big,
they render with spaces in between some of the letters and its
really annoying :(

can someone please look at these few lines of code and tell me
what i am doing wrong?  thanks...

  /* create new textbuffer, we can erase old one */
   tb = gtk_text_buffer_new(NULL);
   gtk_text_buffer_get_start_iter(tb, &textIter);

   /* set pango font description */
   fd = pango_font_description_from_string("KacstQr 22");
   /* modify font for w which is the GtkTextView widget */
   gtk_widget_modify_font(GTK_WIDGET(w), fd);
   pango_font_description_free (fd);
   /* get arabic text ayah */
   ayah = quran_read_verse(q, 1, 1, &ctx);

   /* set tag */
   tag = gtk_text_buffer_create_tag(tb, "bismillah",
                                    GTK_TEXT_DIR_RTL, NULL);

   /* display... */
   gtk_text_buffer_insert_with_tags(tb, &textIter, ayah, -1,
tag, NULL);

   quran_close(q, &ctx);   
   /* update buffer */
   gtk_text_view_set_buffer(GTK_TEXT_VIEW(w), tb);

15 Mbytes Free Web-based and  POP3
Sign up now: http://www.gawab.com