|
From: Allin C. <cot...@wf...> - 2009-11-05 22:29:29
|
On Thu, 5 Nov 2009, Ethan Merritt wrote:
> On Thursday 05 November 2009 13:36:11 Allin Cottrell wrote:
> >
> > On Thu, 5 Nov 2009, Ethan Merritt wrote:
> >
> > > On Thursday 05 November 2009 12:21:24 Ethan Merritt wrote:
> > > > #if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 22
> > > > context = pango_font_map_create_context(fontmap);
> > > > #else
> > > > context = pango_cairo_font_map_create_context(fontmap);
> > > > #endif
> > > >
> > >
> > > Sigh. That doesn't work either:
> > >
> > > wxterminal/gp_cairo.c: In function ‘gp_cairo_create_layout’:
> > > wxterminal/gp_cairo.c:708: warning: passing argument 1 of ‘pango_cairo_font_map_create_context’ from incompatible pointer type
> >
> > Urgh. That function wants a pointer to PangoCairoFontMap, not to
> > PangoFontMap.
> >
> > > We need a better handle on what versions and configurations this
> > > alternate code works on.
> >
> > Yes, I can work on that if you like. What's the pango version on
> > your system, BTW?
>
> The errors I reported are from a system with pango 1.18.2
> libpango1.0_0-1.18.2-1mdv2008.0
>
> I can build successfully on a newer system with
> libpango1.0_0-1.24.1-1mdv2009.1
Thanks. I'm now trying at home where I have pango 1.20.5 on
Ubuntu 8.04. I was getting exactly the same errors as you
described, but I find this works OK (i.e. builds and runs alright)
for the relevant lines in gp_cairo.c.
<C-snippet>
#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 22
context = pango_font_map_create_context(fontmap);
#else
context =
pango_cairo_font_map_create_context((PangoCairoFontMap *) fontmap);
#endif
layout = pango_layout_new(context);
g_object_unref(context);
</C-snippet>
That is, it seems you're OK casting from PangoFontMap to
PangoCairoFontMap. I'll check this with the pango people. (I
didn't find a clear account of this in the pango docs.)
Allin Cottrell
|