summaryrefslogtreecommitdiff
path: root/pango/pangocairo-atsuifont.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-14 13:28:52 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-14 13:28:52 +0000
commit240877fc00047a2898f8f8d338684c2e4e087b90 (patch)
tree2e20d484bad218e4c5f502e21a98be93e66cf79b /pango/pangocairo-atsuifont.c
parent9510da42b83abfcc1c80fe7905c66b931a889d4c (diff)
downloadpango-240877fc00047a2898f8f8d338684c2e4e087b90.tar.gz
Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNing
2006-01-14 Behdad Esfahbod <behdad@gnome.org> Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNing Zhang. * pango/pangocairo-private.h (_PangoCairoFontIface): Add new methods: get_font_face and get_scaled_font, and getters: _pango_cairo_font_get_font_face, _pango_cairo_font_get_scaled_font. * pango/pangocairo-private.h: Add _PangoCairoHexBoxInfo, and getter _pango_cairo_get_hex_box_info, and _pango_cairo_get_glyph_extents_missing. * pango/pangocairo-fcfont.c, pango/pangocairo-atsuifont.c, * pango/pangocairo-win32font.c: Export get_font_face and get_scaled_font methods. * pango/pangocairo-fcfont.c: Use * _pango_cairo_get_glyph_extents_missing on missing glyphs. * pango/pangocairo-font.c: Implement _pango_cairo_font_get_font_face, _pango_cairo_font_get_scaled_font, _pango_cairo_get_hex_box_info, and _pango_cairo_get_glyph_extents_missing. * pango/pangocairo-render.c * (_pango_cairo_renderer_draw_unknown_glyph): Added. * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Cleaned up to use the added function above.
Diffstat (limited to 'pango/pangocairo-atsuifont.c')
-rw-r--r--pango/pangocairo-atsuifont.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/pango/pangocairo-atsuifont.c b/pango/pangocairo-atsuifont.c
index 016e68bb..81a9bac5 100644
--- a/pango/pangocairo-atsuifont.c
+++ b/pango/pangocairo-atsuifont.c
@@ -70,15 +70,6 @@ pango_cairo_atsui_font_install (PangoCairoFont *font,
cairo_set_font_options (cr, cwfont->options);
}
-static void
-cairo_font_iface_init (PangoCairoFontIface *iface)
-{
- iface->install = pango_cairo_atsui_font_install;
-}
-
-G_DEFINE_TYPE_WITH_CODE (PangoCairoATSUIFont, pango_cairo_atsui_font, PANGO_TYPE_ATSUI_FONT,
- { G_IMPLEMENT_INTERFACE (PANGO_TYPE_CAIRO_FONT, cairo_font_iface_init) });
-
static cairo_font_face_t *
pango_cairo_atsui_font_get_font_face (PangoCairoFont *font)
{
@@ -118,6 +109,17 @@ pango_cairo_atsui_font_get_scaled_font (PangoCairoFont *font)
}
static void
+cairo_font_iface_init (PangoCairoFontIface *iface)
+{
+ iface->install = pango_cairo_atsui_font_install;
+ iface->get_font_face = pango_cairo_atsui_font_get_font_face;
+ iface->get_scaled_font = pango_cairo_atsui_font_get_scaled_font;
+}
+
+G_DEFINE_TYPE_WITH_CODE (PangoCairoATSUIFont, pango_cairo_atsui_font, PANGO_TYPE_ATSUI_FONT,
+ { G_IMPLEMENT_INTERFACE (PANGO_TYPE_CAIRO_FONT, cairo_font_iface_init) });
+
+static void
pango_cairo_atsui_font_get_glyph_extents (PangoFont *font,
PangoGlyph glyph,
PangoRectangle *ink_rect,