From: Kenichi Handa Date: Mon, 6 Apr 2009 07:57:46 +0000 (+0000) Subject: (ftfont_open): Fix checking of the return value of X-Git-Tag: emacs-pretest-23.0.93~219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c26f026c83f0cc4193ed534cb6d70e65269e75f;p=emacs.git (ftfont_open): Fix checking of the return value of FT_Load_Char. Fix setting font->underline_thickness. --- diff --git a/src/ChangeLog b/src/ChangeLog index 22890338bea..643483905d1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-04-06 YAMAMOTO Mitsuharu + + * ftfont.c (ftfont_open): Fix checking of the return value of + FT_Load_Char. Fix setting font->underline_thickness. + 2009-04-04 Chong Yidong * terminal.c (Fterminal_name, Fdelete_terminal, Fterminal_name) diff --git a/src/ftfont.c b/src/ftfont.c index aa9777acf34..f515856bcba 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1130,7 +1130,7 @@ ftfont_open (f, entity, pixel_size) 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 @@ ftfont_open (f, entity, pixel_size) 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 {