diff options
author | Owen Taylor <otaylor@redhat.com> | 2004-09-20 17:01:53 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-09-20 17:01:53 +0000 |
commit | 1ef52b779f5c4ceeaebfaa5568ff7eea80969427 (patch) | |
tree | 47dab0263cd805272a1c2de7be4397e53540ee0b /pango | |
parent | cfb9000beb0e2004fa4b2e8ebdf367d89d89d64a (diff) | |
download | pango-1ef52b779f5c4ceeaebfaa5568ff7eea80969427.tar.gz |
Don't use face->ascender/descender for non-scalable fonts, since they
Mon Sep 20 12:17:37 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangofc-font.c (get_face_metrics):
Don't use face->ascender/descender for non-scalable fonts,
since they aren't set. (#Enrico Scholz,
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129246)
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangofc-font.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c index 31851369..a26d2da2 100644 --- a/pango/pangofc-font.c +++ b/pango/pangofc-font.c @@ -308,7 +308,8 @@ get_face_metrics (PangoFcFont *fcfont, FT_Vector_Transform (&vector, &ft_matrix); metrics->ascent = PANGO_UNITS_26_6 (vector.y); } - else if (fcfont->is_hinted) + else if (fcfont->is_hinted || + (face->face_flags & FT_FACE_FLAG_SCALABLE) == 0) { metrics->descent = - PANGO_UNITS_26_6 (face->size->metrics.descender); metrics->ascent = PANGO_UNITS_26_6 (face->size->metrics.ascender); |