[cairo] cairo_show_text and Chinese
Carl Worth
cworth at cworth.org
Wed Oct 1 22:10:47 PDT 2008
On Thu, 2008-07-24 at 14:01 -0400, Behdad Esfahbod wrote:
> On Wed, 2008-07-16 at 22:07 -0700, Carl Worth wrote:
> > On Mon, 2008-07-07 at 15:18 +1200, Robert O'Callahan wrote:
> > >This should be in the FAQ too.
> >
> > Yes, we definitely need a new question answered there:
> >
> > I've been using cairo_show_text, but I want to start doing more
> > complex things than it can do. How can I switch to using pango
> > instead?
> >
> > And the answer would have before and after snippets of code.
> >
> > Behdad, want to write up that answer for us? If you'd like to just post
> > a reply to this message, I'd be glad to put the answer into the FAQ page
> > on the wiki.
>
> It will become much simpler in the future, but for now:
[...]
Thanks much for that example, Behdad!
I'm really late in posting this, but better late than never, right?
http://cairographics.org/FAQ/#using_pango
The FAQ was already using C, so I ported the example code from python to
C. That definitely made it a little less pretty. And it's possible that
my port could be improved, (it wasn't obvious to me from the pango
documentation whether the C API provides an equivalent of "serif 32px"
or not, for example).
Anyway, Behdad, (or anyone else), if you could read over what I put
together and clean it up as necessary, that would be appreciated.
But this should make a nice addition to the FAQ I think.
-Carl
More information about the cairo
mailing list