diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-01-14 13:28:52 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-01-14 13:28:52 +0000 |
commit | 240877fc00047a2898f8f8d338684c2e4e087b90 (patch) | |
tree | 2e20d484bad218e4c5f502e21a98be93e66cf79b /pango/pangocairo-private.h | |
parent | 9510da42b83abfcc1c80fe7905c66b931a889d4c (diff) | |
download | pango-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-private.h')
-rw-r--r-- | pango/pangocairo-private.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pango/pangocairo-private.h b/pango/pangocairo-private.h index 75be37ec..290c761c 100644 --- a/pango/pangocairo-private.h +++ b/pango/pangocairo-private.h @@ -60,12 +60,18 @@ struct _PangoCairoFontIface void (*install) (PangoCairoFont *font, cairo_t *cr); + + cairo_font_face_t *(*get_font_face) (PangoCairoFont *font); + + cairo_scaled_font_t *(*get_scaled_font) (PangoCairoFont *font); }; GType pango_cairo_font_get_type (void); void _pango_cairo_font_install (PangoCairoFont *font, cairo_t *cr); +cairo_font_face_t *_pango_cairo_font_get_font_face (PangoCairoFont *font); +cairo_scaled_font_t *_pango_cairo_font_get_scaled_font (PangoCairoFont *font); #define PANGO_TYPE_CAIRO_RENDERER (pango_cairo_renderer_get_type()) #define PANGO_CAIRO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_RENDERER, PangoCairoRenderer)) @@ -78,6 +84,25 @@ GType pango_cairo_renderer_get_type (void); const cairo_font_options_t *_pango_cairo_context_get_merged_font_options (PangoContext *context); +typedef struct _PangoCairoHexBoxInfo PangoCairoHexBoxInfo; + +struct _PangoCairoHexBoxInfo +{ + PangoFont *font; + double digit_width; + double digit_height; + double pad; + double box_descent; + double box_height; +}; + +PangoCairoHexBoxInfo *_pango_cairo_get_hex_box_info (PangoCairoFont *font); + +void _pango_cairo_get_glyph_extents_missing (PangoCairoFont *cfont, + PangoGlyph glyph, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); + G_END_DECLS #endif /* __PANGOCAIRO_PRIVATE_H__ */ |