summaryrefslogtreecommitdiff
path: root/pango/pangoxft-font.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-07-10 21:41:37 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-07-10 21:41:37 +0000
commit0835f598fcfbf6667a4be9cd9e7f6f16663dcb6a (patch)
treeff38ab996514339ab0ad7b2be560b525a6537655 /pango/pangoxft-font.c
parent5bf0c1d04b6ed75ad2c88fbed1e1eaecf0dcbfa2 (diff)
downloadpango-0835f598fcfbf6667a4be9cd9e7f6f16663dcb6a.tar.gz
Make PangoMatrix arguments const where appropriate.
Sat Jul 10 17:33:38 2004 Owen Taylor <otaylor@redhat.com> * pango/pangoft2-private.h pango/pangoft2-render.c pango/pango-context.[ch] pango/pangoft2.[ch] pango/pango-utils. pango/pango-types.h pango/pangofc-fontmap.c: Make PangoMatrix arguments const where appropriate. * pango/pango-context.c pango/fonts.c pango/pangofc-font.c pangofc-fontmap.c pango/pangoft2.c pango/pangoft2-fontmap.c pango/pangoxft-font.c pango/pangoxft-fontmap.c pango/pangowin32-fontmap.c: Use G_DEFINE_TYPE comprehensively. * pango/pangoft2-private.h pangoft2.c: Un-staticify pango_ft2_font_get_type.
Diffstat (limited to 'pango/pangoxft-font.c')
-rw-r--r--pango/pangoxft-font.c44
1 files changed, 9 insertions, 35 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 8b7412ee..6634f353 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -41,10 +41,7 @@ struct _PangoXftFontClass
PangoFcFontClass parent_class;
};
-static PangoFontClass *parent_class; /* Parent class structure for PangoXftFont */
-
-static void pango_xft_font_class_init (PangoXftFontClass *class);
-static void pango_xft_font_finalize (GObject *object);
+static void pango_xft_font_finalize (GObject *object);
static void pango_xft_font_get_glyph_extents (PangoFont *font,
PangoGlyph glyph,
@@ -63,33 +60,7 @@ static void pango_xft_font_real_shutdown (PangoFcFont *font)
static XftFont *xft_font_get_font (PangoFont *font);
-GType
-pango_xft_font_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (PangoXftFontClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) pango_xft_font_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoXftFont),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- };
-
- object_type = g_type_register_static (PANGO_TYPE_FC_FONT,
- "PangoXftFont",
- &object_info, 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (PangoXftFont, pango_xft_font, PANGO_TYPE_FC_FONT)
static void
pango_xft_font_class_init (PangoXftFontClass *class)
@@ -98,8 +69,6 @@ pango_xft_font_class_init (PangoXftFontClass *class)
PangoFontClass *font_class = PANGO_FONT_CLASS (class);
PangoFcFontClass *fc_font_class = PANGO_FC_FONT_CLASS (class);
- parent_class = g_type_class_peek_parent (class);
-
object_class->finalize = pango_xft_font_finalize;
font_class->get_glyph_extents = pango_xft_font_get_glyph_extents;
@@ -112,6 +81,11 @@ pango_xft_font_class_init (PangoXftFontClass *class)
fc_font_class->shutdown = pango_xft_font_real_shutdown;
}
+static void
+pango_xft_font_init (PangoXftFont *xftfont)
+{
+}
+
PangoXftFont *
_pango_xft_font_new (PangoXftFontMap *xftfontmap,
FcPattern *pattern)
@@ -438,7 +412,7 @@ pango_xft_font_finalize (GObject *object)
if (xfont->glyph_info)
g_hash_table_destroy (xfont->glyph_info);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (pango_xft_font_parent_class)->finalize (object);
}
static void
@@ -568,7 +542,7 @@ pango_xft_font_get_glyph_extents (PangoFont *font,
}
else if (glyph)
{
- if (!fcfont->transform)
+ if (!fcfont->is_transformed)
get_glyph_extents_xft (fcfont, glyph, ink_rect, logical_rect);
else
get_glyph_extents_raw (xfont, glyph, ink_rect, logical_rect);