summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fcfont.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-11-28 21:17:39 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-11-28 21:17:39 +0000
commit730324111fd91f6778a8da8cacb3fe4b2eab64c7 (patch)
tree17f055e08b7ef1697cf982d2f061aa204baa8d80 /pango/pangocairo-fcfont.c
parentca3bbbed0304c49cda8a222d52a75235c3c0c6cf (diff)
downloadpango-730324111fd91f6778a8da8cacb3fe4b2eab64c7.tar.gz
Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the object
2006-11-28 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_font_face), (pango_cairo_fc_font_install), (pango_cairo_fc_font_finalize), (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_shutdown), (_pango_cairo_fc_font_new): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_set_resolution), (pango_cairo_fc_font_map_get_resolution_cairo), (pango_cairo_fc_font_map_get_renderer), (pango_cairo_fc_font_map_finalize), (pango_cairo_fc_font_map_get_resolution_fc), (pango_cairo_fc_font_map_create_font): * pango/pangocairo-font.c (_pango_cairo_font_install), (_pango_cairo_font_get_font_face), (_pango_cairo_font_get_scaled_font), (_pango_cairo_font_get_hex_box_info): * pango/pangocairo-fontmap.c (pango_cairo_create_layout): * pango/pangocairo-render.c (set_color), (_pango_cairo_renderer_draw_unknown_glyph), (pango_cairo_renderer_draw_glyphs), (pango_cairo_renderer_draw_rectangle), (pango_cairo_renderer_draw_error_underline): Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the object cannot have reached us if it wasn't of the right type.
Diffstat (limited to 'pango/pangocairo-fcfont.c')
-rw-r--r--pango/pangocairo-fcfont.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index 727b6dbe..0854a032 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -91,8 +91,8 @@ static cairo_font_face_t *pango_cairo_fc_font_get_font_face (PangoCairoFont *fon
static cairo_font_face_t *
pango_cairo_fc_font_get_font_face (PangoCairoFont *font)
{
- PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (font);
- PangoFcFont *fcfont = PANGO_FC_FONT (cffont);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) (font);
+ PangoFcFont *fcfont = (PangoFcFont *) (cffont);
if (!cffont->font_face)
{
@@ -146,7 +146,7 @@ static gboolean
pango_cairo_fc_font_install (PangoCairoFont *font,
cairo_t *cr)
{
- PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (font);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) (font);
cairo_set_font_face (cr,
pango_cairo_fc_font_get_font_face (font));
@@ -170,7 +170,7 @@ G_DEFINE_TYPE_WITH_CODE (PangoCairoFcFont, pango_cairo_fc_font, PANGO_TYPE_FC_FO
static void
pango_cairo_fc_font_finalize (GObject *object)
{
- PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (object);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) (object);
if (cffont->font_face)
cairo_font_face_destroy (cffont->font_face);
@@ -195,8 +195,8 @@ static PangoFontMetrics *
pango_cairo_fc_font_get_metrics (PangoFont *font,
PangoLanguage *language)
{
- PangoFcFont *fcfont = PANGO_FC_FONT (font);
- PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (font);
+ PangoFcFont *fcfont = (PangoFcFont *) (font);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) (font);
PangoFcMetricsInfo *info = NULL; /* Quiet gcc */
GSList *tmp_list;
@@ -409,7 +409,7 @@ pango_cairo_fc_font_get_glyph_extents (PangoFont *font,
static void
pango_cairo_fc_font_shutdown (PangoFcFont *fcfont)
{
- PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (fcfont);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) (fcfont);
if (cffont->scaled_font)
{
cairo_scaled_font_destroy (cffont->scaled_font);
@@ -547,8 +547,8 @@ _pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap,
/* fcfont's is_hinted controls metric hinting
*/
- PANGO_FC_FONT(cffont)->is_hinted =
+ ((PangoFcFont *)(cffont))->is_hinted =
(cairo_font_options_get_hint_metrics(cffont->options) != CAIRO_HINT_METRICS_OFF);
- return PANGO_FC_FONT (cffont);
+ return (PangoFcFont *) (cffont);
}