Re: Pango cairo target surface size
Lawrence D'Oliveiro <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Mon, 23 Mar 2015 10:46:11 +0800, Rob Kramer wrote: > I would like to create a cairo image surface that is equal to the > logical extents of a text string. This seems to be a chicken-and-egg > problem, since I need a cairo_t with surface before I can use layout > functions (and the surface size isn't known yet). That’s easy. You can create an ImageSurface with 0 width and 0 height, put a cairo_t on top of that, and do your text measurements without any drawing taking place. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo