[MPlayer-cvslog] r25688 - trunk/libass/ass_font.c

eugeni subversion at mplayerhq.hu
Sat Jan 12 03:27:01 CET 2008


Author: eugeni
Date: Sat Jan 12 03:27:01 2008
New Revision: 25688

Log:
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.


Modified:
   trunk/libass/ass_font.c

Modified: trunk/libass/ass_font.c
==============================================================================
--- trunk/libass/ass_font.c	(original)
+++ trunk/libass/ass_font.c	Sat Jan 12 03:27:01 2008
@@ -248,14 +248,8 @@ void ass_font_get_asc_desc(ass_font_t* f
 	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;
 		}
 	}



More information about the MPlayer-cvslog mailing list