summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-09-22 20:31:54 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-09-22 20:31:54 +0000
commit6ce8121cc5b7ad6e5eb14cae75dc8faf98b296dc (patch)
tree79a2403a8461c8c6799897155de9528588a2c918 /pango
parentbb2d38b6dd3c79e9b3a8501072ead2c7555aadd4 (diff)
downloadpango-6ce8121cc5b7ad6e5eb14cae75dc8faf98b296dc.tar.gz
Use get_glyph_extents_raw() when hinting is disabled as well as when we
Wed Sep 22 16:15:40 2004 Owen Taylor <otaylor@redhat.com> * pango/pangoxft-font.c (pango_xft_font_get_glyph_extents): Use get_glyph_extents_raw() when hinting is disabled as well as when we are transforming. (#152529, Vincent Noel) * pango/pangofc-font.c (pango_fc_font_get_raw_extents): Duplicate the fix for non-scalable fonts from get_face_metrics() here as well.
Diffstat (limited to 'pango')
-rw-r--r--pango/pangofc-font.c3
-rw-r--r--pango/pangoxft-font.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index a26d2da2..71c81bc2 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -747,7 +747,8 @@ pango_fc_font_get_raw_extents (PangoFcFont *fcfont,
{
logical_rect->x = 0;
logical_rect->width = PANGO_UNITS_26_6 (gm->horiAdvance);
- if (fcfont->is_hinted)
+ if (fcfont->is_hinted ||
+ (face->face_flags & FT_FACE_FLAG_SCALABLE) == 0)
{
logical_rect->y = - PANGO_UNITS_26_6 (face->size->metrics.ascender);
logical_rect->height = PANGO_UNITS_26_6 (face->size->metrics.ascender - face->size->metrics.descender);
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index d7c6bf3a..9834ba6b 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -542,7 +542,7 @@ pango_xft_font_get_glyph_extents (PangoFont *font,
}
else if (glyph)
{
- if (!fcfont->is_transformed)
+ if (!fcfont->is_transformed && fcfont->is_hinted)
get_glyph_extents_xft (fcfont, glyph, ink_rect, logical_rect);
else
get_glyph_extents_raw (xfont, glyph, ink_rect, logical_rect);