changeset 25660:3993c96eaa95

Do not try to guess font metrics based on its bounding box. It was originally a workaround for fonts with bad ascender/descender values, but it breaks display of some otherwise valid fonts (bugzilla 987), so reverted.
author eugeni
date Sat, 12 Jan 2008 02:27:01 +0000
parents 706d6ecf3c7c
children 293aeec83153
files libass/ass_font.c
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_font.c	Sat Jan 12 01:14:45 2008 +0000
+++ b/libass/ass_font.c	Sat Jan 12 02:27:01 2008 +0000
@@ -248,14 +248,8 @@
 	for (i = 0; i < font->n_faces; ++i) {
 		FT_Face face = font->faces[i];
 		if (FT_Get_Char_Index(face, ch)) {
-			int v, v2;
-			v = face->size->metrics.ascender;
-			v2 = FT_MulFix(face->bbox.yMax, face->size->metrics.y_scale);
-			*asc = (v > v2 * 0.9) ? v : v2;
-				
-			v = - face->size->metrics.descender;
-			v2 = - FT_MulFix(face->bbox.yMin, face->size->metrics.y_scale);
-			*desc = (v > v2 * 0.9) ? v : v2;
+			*asc = face->size->metrics.ascender;
+			*desc = - face->size->metrics.descender;
 			return;
 		}
 	}