After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 314675 - problem with get_type functions in pangocairo
problem with get_type functions in pangocairo
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other opensolaris
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2005-08-27 23:55 UTC by Brian Cameron
Modified: 2006-01-16 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix uninstalled-pc file (595 bytes, patch)
2005-09-06 23:03 UTC, Brian Cameron
none Details | Review
patch to fix configure when using uninstalled cairo (646 bytes, patch)
2005-09-06 23:03 UTC, Brian Cameron
none Details | Review

Description Brian Cameron 2005-08-27 23:55:32 UTC
I notice that in pango/pangocairo-fc.h that pango_cairo_fc_font_map_get type()
is defined, and that in pango/pangocairo-fcfont.c pango_cairo_fc_font_get_type
is defined as an interface, yet these two functions don't seem to be defined
anywhere in pango.  This causes problems linking with the pangocairo.so library
when linking it with GTK+.  Should the PANGO_TYPE_XFT_FONT_MAP and the
PANGO_TYPE_XFT_FONT be redefined to use a G_TYPE_CHECK_INSTANCE_CAST macro like
the other _TYPE_ macros used in pango and these two functions removed?  If so, I
can provide a patch.
Comment 1 Brian Cameron 2005-08-28 00:02:11 UTC
Another issue I notice with the configure script in pango is that it uses 
"AC_CHECK_LIB(cairo, cairo_ft_scaled_font_lock_face, have_cairo_freetype=true
, :)" to identify if cairo has cairo_freetype.  AC_CHECK_LIB macros don't work
if you are using cairo's uninstalled.pc file to build since the cairo library
isn't actually installed when the test runs and the uninstalled.pc file puts the 
"-L${pc_top_builddir}/${pcfiledir}/src/libcair.la" into the link statement,
which confuses the linker since libtool isn't used by AC_CHECK_LIB.  Not sure if
there is a way to check for this feature without needing AC_CHECK_LIB.  If not,
I can hack the configure.in script locally to work around this problem.  Perhaps
a --enable-pangocairo configure argument could be passed to tell it to default
to true instead of checking?  If this is acceptable, I'll provide a patch.


Comment 2 Owen Taylor 2005-08-28 01:17:37 UTC
G_DEFINE_TYPE_WITH_CODE (PangoCairoFcFontMap, pango_cairo_fc_font_map,
PANGO_TYPE_FC_FONT_MAP,
    { G_IMPLEMENT_INTERFACE (PANGO_TYPE_CAIRO_FONT_MAP,
cairo_font_map_iface_init) });


G_DEFINE_TYPE_WITH_CODE (PangoCairoFcFont, pango_cairo_fc_font, PANGO_TYPE_FC_FONT,
    { G_IMPLEMENT_INTERFACE (PANGO_TYPE_CAIRO_FONT, cairo_font_iface_init) });

I think you'll find them in the library if you use nm. 

I'm not sure how the Xft macros are involved at all...

In terms of the uninstalled stuff, there are some examples in GTK+'s
configure.in of handling bypassing tests. You probably can just assume 
cairo-freetype is there if building with -uninstalled; when the first person
wants to use -uninstalled files on Windows we can deal with it then.
Comment 3 Brian Cameron 2005-09-06 23:03:05 UTC
Created attachment 51894 [details] [review]
fix uninstalled-pc file
Comment 4 Brian Cameron 2005-09-06 23:03:50 UTC
Created attachment 51895 [details] [review]
patch to fix configure when using uninstalled cairo
Comment 5 Behdad Esfahbod 2006-01-16 10:28:39 UTC
2006-01-16  Behdad Esfahbod  <behdad@gnome.org>

        Fixes bug #314675, Brian Cameron.

        * configure.in: Handle uninstalled cairo.

        * pangocairo-uninstalled.pc.in: Fix typo: libpangoxft->libpangocairo.