Re: pango or any other way to format text
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: David NeÄas <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: pango or any other way to format text
- Date: Mon, 14 May 2012 17:55:26 +0300
See http://developer.gnome.org/pango/stable/PangoMarkupFormat.html for the
syntax for subscripts and superscripts.
Regards,
Dov
On Mon, May 14, 2012 at 3:38 PM, David NeÄas <yeti physics muni cz> wrote:
On Mon, May 14, 2012 at 08:20:26PM +0800, Rudra Banerjee wrote:
Can anybody please take some time to show me simple way of
implementing pango formatting to get greek letters, subscripts and
superscripts in gtk2+?
What do you mean by âimplementing Pango formatting'? I suppose you are
not writing a Pango backend, i.e. you are not *implementing* any text
rendering yourself.
If you just want to use Pango to render Greek text, subscripts,
superscripts, Cyrillic, math symbols or whatever, use UTF-8:
GtkWidget *label = gtk_label_new("áÏá ÏÎá áÎÎÎÏ ÎÎÏÎÏÏÎÎÎ");
or
GtkWidget *label = gtk_label_new("a + b = cÂ");
That's it.
Function gtk_label_set_markup() with Pango markup
http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
can be used for more complex indexes and exponents and other stuff in
labels.
Yeti
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]