diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-06-11 03:00:39 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-06-11 03:00:39 +0000 |
commit | c82dcf4c9cda78350bc844f6187bac5df87f5444 (patch) | |
tree | 84e809493cffad93cb3fcc0f65558499e2c6f405 /pango/pangocairo-font.c | |
parent | 1bc615b0a5863c5680770171f014a1f99c975a9e (diff) | |
download | pango-c82dcf4c9cda78350bc844f6187bac5df87f5444.tar.gz |
Bug 347236 – provide pango_cairo_font_get_scaled_font Bug 347235 – Add
2007-06-10 Behdad Esfahbod <behdad@gnome.org>
Bug 347236 – provide pango_cairo_font_get_scaled_font
Bug 347235 – Add pango_cairo_font_map_get_font_type
Bug 353291 – Provide pango_cairo_font_map_new_for_font_type
* pango/pangocairo-font.c: New public API:
pango_cairo_font_get_scaled_font()
* pango/pangocairo-fontmap.c: New public API:
pango_cairo_font_map_new_for_font_type()
pango_cairo_font_map_get_font_type()
* pango/pangocairo-fcfontmap.c:
Implement get_font_type() method.
* pango/pangocairo.h:
* pango/pangocairo-private.h:
* docs/pango-sections.txt:
* docs/tmpl/pangocairo.sgml:
* pango/pangocairo.def:
Update.
svn path=/trunk/; revision=2336
Diffstat (limited to 'pango/pangocairo-font.c')
-rw-r--r-- | pango/pangocairo-font.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c index 5f439998..9b449c0e 100644 --- a/pango/pangocairo-font.c +++ b/pango/pangocairo-font.c @@ -140,8 +140,20 @@ done: return cf_priv->scaled_font; } -static cairo_scaled_font_t * -_pango_cairo_font_get_scaled_font (PangoFont *cfont) +/** + * pango_cairo_font_get_scaled_font: + * @font: a #PangoFont from a #PangoCairoFontMap + * + * Gets the #cairo_scaled_font_t used by @font. + * The scaled font can be referenced and ketp using + * cairo_scaled_font_reference(). + * + * Return value: the #cairo_scaled_font_t used by @font + * + * Since: 1.18 + **/ +cairo_scaled_font_t * +pango_cairo_font_get_scaled_font (PangoFont *cfont) { PangoCairoFontPrivate *cf_priv; @@ -150,7 +162,7 @@ _pango_cairo_font_get_scaled_font (PangoFont *cfont) if (!_pango_cairo_warning_history.font_get_scaled_font) { _pango_cairo_warning_history.font_get_scaled_font = TRUE; - g_warning ("_pango_cairo_font_get_scaled_font called with bad font, expect ugly output"); + g_warning ("pango_cairo_font_get_scaled_font called with bad font, expect ugly output"); } return NULL; } @@ -174,7 +186,7 @@ gboolean _pango_cairo_font_install (PangoFont *font, cairo_t *cr) { - cairo_scaled_font_t *scaled_font = _pango_cairo_font_get_scaled_font (font); + cairo_scaled_font_t *scaled_font = pango_cairo_font_get_scaled_font (font); if (G_UNLIKELY (scaled_font == NULL || cairo_scaled_font_status (scaled_font) != CAIRO_STATUS_SUCCESS)) return FALSE; @@ -392,7 +404,7 @@ _pango_cairo_font_private_get_hex_box_info (PangoCairoFontPrivate *cf_priv) cairo_font_options_destroy (font_options); - scaled_mini_font = _pango_cairo_font_get_scaled_font (mini_font); + scaled_mini_font = pango_cairo_font_get_scaled_font (mini_font); for (i = 0 ; i < 16 ; i++) { |