Mercurial > emacs
comparison src/font.c @ 97853:fa1023e4960c
(font_fill_lglyph_metrics): Use EMACS_INT in LGLYPH_SET_CODE to avoid
compiler warnings.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 29 Aug 2008 09:54:05 +0000 |
parents | f44734c99365 |
children | 629cccd78d85 |
comparison
equal
deleted
inserted
replaced
97852:951870b6c085 | 97853:fa1023e4960c |
---|---|
4193 void | 4193 void |
4194 font_fill_lglyph_metrics (glyph, font_object) | 4194 font_fill_lglyph_metrics (glyph, font_object) |
4195 Lisp_Object glyph, font_object; | 4195 Lisp_Object glyph, font_object; |
4196 { | 4196 { |
4197 struct font *font = XFONT_OBJECT (font_object); | 4197 struct font *font = XFONT_OBJECT (font_object); |
4198 unsigned code = font->driver->encode_char (font, LGLYPH_CHAR (glyph)); | 4198 unsigned code; |
4199 /* ecode used in LGLYPH_SET_CODE to avoid compiler warnings. */ | |
4200 EMACS_INT ecode = font->driver->encode_char (font, LGLYPH_CHAR (glyph)); | |
4199 struct font_metrics metrics; | 4201 struct font_metrics metrics; |
4200 | 4202 |
4201 LGLYPH_SET_CODE (glyph, code); | 4203 LGLYPH_SET_CODE (glyph, ecode); |
4204 code = ecode; | |
4202 font->driver->text_extents (font, &code, 1, &metrics); | 4205 font->driver->text_extents (font, &code, 1, &metrics); |
4203 LGLYPH_SET_LBEARING (glyph, metrics.lbearing); | 4206 LGLYPH_SET_LBEARING (glyph, metrics.lbearing); |
4204 LGLYPH_SET_RBEARING (glyph, metrics.rbearing); | 4207 LGLYPH_SET_RBEARING (glyph, metrics.rbearing); |
4205 LGLYPH_SET_WIDTH (glyph, metrics.width); | 4208 LGLYPH_SET_WIDTH (glyph, metrics.width); |
4206 LGLYPH_SET_ASCENT (glyph, metrics.ascent); | 4209 LGLYPH_SET_ASCENT (glyph, metrics.ascent); |