]> Pileus Git - ~andy/gtk/blobdiff - gdk/linux-fb/gdkpango-fb.c
GCompareFunc -> GEqualFunc where applicable.
[~andy/gtk] / gdk / linux-fb / gdkpango-fb.c
index 08c005dd6dd7b685a61e9bbdd28f70effa0fcaa5..49fc3801a9f23c5ae5be89425d946c1ccabc9955 100644 (file)
@@ -99,7 +99,8 @@ pango_fb_font_map_get_type(void)
       
       object_type = g_type_register_static (PANGO_TYPE_FONT_MAP,
                                             "PangoFBFontMap",
-                                            &object_info);
+                                            &object_info,
+                                           0);
     }
   
   return object_type;
@@ -142,7 +143,7 @@ pango_fb_font_map_load_font(PangoFontMap *fontmap,
     {
       fl = g_ptr_array_index(fbfm->all_descs, i);
 
-      /* Can't use pango_font_description_compare() because it checks ->size as well */
+      /* Can't use pango_font_description_equal() because it checks ->size as well */
       if(!g_strcasecmp(desc->family_name, fl->desc.family_name)
         && desc->style == fl->desc.style
         && desc->weight == fl->desc.weight
@@ -152,7 +153,7 @@ pango_fb_font_map_load_font(PangoFontMap *fontmap,
   if(i >= fbfm->all_descs->len)
     return NULL;
 
-  retval = (PangoFBFont *)g_type_create_instance(PANGO_TYPE_FB_FONT);
+  retval = (PangoFBFont *)g_object_new (PANGO_TYPE_FB_FONT, NULL);
 
   retval->desc = *desc;
   retval->desc.family_name = g_strdup(desc->family_name);
@@ -275,7 +276,7 @@ pango_fb_font_map_init(PangoFBFontMap *fontmap)
   };
   int i;
 
-  fontmap->all_fonts = g_hash_table_new(pango_font_description_hash, (GCompareFunc)pango_font_description_compare);
+  fontmap->all_fonts = g_hash_table_new(pango_font_description_hash, (GEqualFunc)pango_font_description_equal);
   fontmap->all_descs = g_ptr_array_new();
   for(i = 0; font_dirs[i]; i++)
     list_fonts(fontmap, NULL, fontmap->all_descs, font_dirs[i]);
@@ -435,7 +436,8 @@ pango_fb_font_get_type (void)
       
       object_type = g_type_register_static (PANGO_TYPE_FONT,
                                             "PangoFBFont",
-                                            &object_info);
+                                            &object_info,
+                                           0);
     }
   
   return object_type;
@@ -472,6 +474,7 @@ pango_fb_font_get_glyph_info(PangoFont *font, PangoGlyph glyph)
   FT_GlyphSlot g;
   PangoRectangle *my_logical_rect, *my_ink_rect;
   FT_Face ftf;
+  gboolean free_buffer = FALSE;
 
   ftf = fbf->ftf;
 
@@ -506,6 +509,7 @@ pango_fb_font_get_glyph_info(PangoFont *font, PangoGlyph glyph)
        g_error("Glyph render failed");
 
       renderme = &bgy->bitmap;
+      free_buffer = TRUE;
     }
   else
     renderme = &g->bitmap;