summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fcfont.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-02-02 10:52:49 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-02-02 10:52:49 +0000
commitda58dbfdea113caa46448c0bb3bf945b4a18f502 (patch)
treebd04c2e6d5d4f74ee5eef9a3dd8a1c2bdaeb5f7e /pango/pangocairo-fcfont.c
parent93be594100f783b409cba98f6c9d58060c4ef433 (diff)
downloadpango-da58dbfdea113caa46448c0bb3bf945b4a18f502.tar.gz
Use PANGO_GLYPH_NULL for when no glyph should be drawn. Use
2006-02-02 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c, modules/basic/basic-fc.c, modules/basic/basic-win32.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, modules/thai/thai-fc.c, modules/tibetan/tibetan-fc.c, pango/fonts.c, pango/pango-engine-private.h pango/pango-types.h, pango/pangocairo-fcfont.c, pango/pangocairo-font.c, pango/pangocairo-private.h, pango/pangocairo-render.c, pango/pangofc-decoder.c, pango/pangofc-font.c, pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32.c, pango/pangox.c, pango/pangoxft-font.c pango/pangoxft-private.h, pango/pangoxft-render.c, pango/shape.c: Use PANGO_GLYPH_NULL for when no glyph should be drawn. Use PANGO_GLYPH_UNKNOWN_FLAG for all backends to mark unknown flags. There's no need for pango_font_get_unknown_glyph() anymore, since all backends know how to handle PANGO_GLYPH_UNKNOWN_FLAG gracefully. We may add that in the future however. (fixes bug #73147, closes bug #329524)
Diffstat (limited to 'pango/pangocairo-fcfont.c')
-rw-r--r--pango/pangocairo-fcfont.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index 38145711..49326088 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -346,13 +346,6 @@ pango_cairo_fc_font_get_glyph (PangoFcFont *font,
return entry->glyph;
}
-static PangoGlyph
-pango_cairo_fc_font_real_get_unknown_glyph (PangoFcFont *font,
- gunichar wc)
-{
- return wc | PANGO_CAIRO_UNKNOWN_FLAG;
-}
-
static void
pango_cairo_fc_font_glyph_extents_cache_init (PangoCairoFcFont *cffont)
{
@@ -445,12 +438,7 @@ pango_cairo_fc_font_get_glyph_extents (PangoFont *font,
if (cffont->glyph_extents_cache == NULL)
pango_cairo_fc_font_glyph_extents_cache_init (cffont);
- if (glyph & PANGO_CAIRO_UNKNOWN_FLAG)
- {
- _pango_cairo_get_glyph_extents_missing((PangoCairoFont *)font, glyph, ink_rect, logical_rect);
- return;
- }
- else if (!glyph)
+ if (glyph == PANGO_GLYPH_NULL)
{
if (ink_rect)
*ink_rect = cffont->font_extents;
@@ -458,6 +446,11 @@ pango_cairo_fc_font_get_glyph_extents (PangoFont *font,
*logical_rect = cffont->font_extents;
return;
}
+ else if (glyph & PANGO_GLYPH_UNKNOWN_FLAG)
+ {
+ _pango_cairo_get_glyph_extents_missing((PangoCairoFont *)font, glyph, ink_rect, logical_rect);
+ return;
+ }
entry = pango_cairo_fc_font_get_glyph_extents_cache_entry (cffont, glyph);
@@ -514,7 +507,6 @@ pango_cairo_fc_font_class_init (PangoCairoFcFontClass *class)
fc_font_class->lock_face = pango_cairo_fc_font_lock_face;
fc_font_class->unlock_face = pango_cairo_fc_font_unlock_face;
fc_font_class->get_glyph = pango_cairo_fc_font_get_glyph;
- fc_font_class->get_unknown_glyph = pango_cairo_fc_font_real_get_unknown_glyph;
fc_font_class->shutdown = pango_cairo_fc_font_shutdown;
#ifdef PROFILE_GLYPH_CACHE