A more CTL friendly gnome_font_get_width_utf8_sized() ?
Sayamindu Dasgupta <[email protected]>
| Newsgroups | gmane.comp.gnome.print |
|---|---|
| Message-ID | <[email protected]> |
Hi, Since we are on the topic of making Pango and gnome-print better integrated, I think gnome_font_get_width_utf8_sized() (libgnomeprint/ gnome-font.c: line 716) should be updated so that it handles complex scripts properly. Currently, it just adds up the glyph widths of all the code points present in the text passed to it. This is OK for English, but as soon as one moves into scripts where codepoint:glyph ratio is not always 1:1, it makes stuff look really ugly. IIRC, gnome_font_get_width_utf8() is used quite extensively to determine line break positions in GtkHTML 3.0. I am not very familiar with the Pango API, but I think the new libgnomeprint API should make line breaking easier with pango_layout_set_width() and pango_layout_set_wrap(). That should probably eliminate the need for gnome_font_get_width_utf8_sized(). -thanks- Sayamindu PS: Sorry for starting a new thread, but I just wasn't subscribed to the list. -- Sayamindu Dasgupta [http://sayamindu.randomink.org/ramblings]