Re: A more CTL friendly gnome_font_get_width_utf8_sized() ?
Jody Goldberg <[email protected]>
| Newsgroups | gmane.comp.gnome.print |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 04, 2004 at 03:54:30PM -0400, Owen Taylor wrote: > > * Should we make gnome_print_show(), etc, use the Pango > code to get proper CTL behavior? > > My suggestion: No. The GnomeFont API is intertwined with the > current drawing functions and changing what they do would > just break current apps. True, but there is some utility in supporting it for new code. A gnome_print_show_layout would not be encumbered by backwards compat issues. > * Should we have some convenience functions for drawing / measuring > strings separate from the current API that don't require creating > a layout? > > My suggestion: No. Creating a layout is pretty convenient, and > it's pretty common to want to measure *and* draw at the same > time, or set a wrap width, or... so it's clearer just to have > one API. We don't have any convenience APIs to bypass creating > a layout for GDK. I don't see a need for extra api, here. However, your contention that people frequently measure and draw at the same time doesn't ring true. To me that seems like a minority situation. All uses of pango I've seen to date have had a distinct measuring step for allocation before potentially measuring again during rendering. > * Should we have something similar to pango_layout_get_size_pixels() > that returns a double width/height rather than fixed-point > Pango units. > > My suggestion: No. (But I'm less sure about this one). Having > this in the gnome-print API strikes me as rather a strange place > for it, and there are lots of places where Pango units surface in the > Pango API; I'm not sure where you would stop adding convenience > wrappers. While I agree that a pango extension doesn't make sense here, a gnomeprint convenience function to map from pango units to pts will likely save people some pain.