changeset 102859:c8428ec4532f

(ftfont_open): Fix checking of the return value of FT_Load_Char. Fix setting font->underline_thickness.
author Kenichi Handa <handa@m17n.org>
date Mon, 06 Apr 2009 07:56:47 +0000
parents 23b3b24769af
children 4b5a8f3d1216
files src/ftfont.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ftfont.c	Mon Apr 06 06:31:49 2009 +0000
+++ b/src/ftfont.c	Mon Apr 06 07:56:47 2009 +0000
@@ -1130,7 +1130,7 @@
 
       font->min_width = font->average_width = font->space_width = 0;
       for (i = 32, n = 0; i < 127; i++)
-	if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
+	if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) == 0)
 	  {
 	    int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
 
@@ -1153,7 +1153,7 @@
   if (scalable)
     {
       font->underline_position = -ft_face->underline_position * size / upEM;
-      font->underline_thickness = -ft_face->underline_thickness * size / upEM;
+      font->underline_thickness = ft_face->underline_thickness * size / upEM;
     }
   else
     {