[pango] How to draw underlined spaces
- From: Francesco Montorsi <f18m_cpp217828 yahoo it>
- To: gtk-app-devel-list gnome org
- Subject: [pango] How to draw underlined spaces
- Date: Sun, 11 Jun 2006 17:54:18 +0200
Hi all,
I know this list is devoted to GTK but I couldn't find any
pango-specific list so I'm sending this here...
Rendering a PangoLayout through gdk_draw_layout(), which contains a
string with leading and/or trailing spaces, with an underlined font
results in text correctly underlined except for those spaces which are
'trimmed out'.
If I try to render (with underlined attribute set) a string containing
only spaces, I get no output at all.
How can I render underlined spaces in pango ??
Thanks a lot!
Francesco
PS: I'm doing something like:
char data[] = " hello world ";
datalen = strlen(data);
pango_layout_set_text( m_layout, data, datalen);
PangoAttrList *attrs = pango_attr_list_new();
PangoAttribute *a = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);
a->start_index = 0;
a->end_index = datalen;
pango_attr_list_insert(attrs, a);
pango_layout_set_attributes(m_layout, attrs);
pango_attr_list_unref(attrs);
gdk_draw_layout( m_window, m_textGC, x, y, m_layout );
where m_layout, m_window and m_textGC are all correctly initialized.
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]