aboutsummaryrefslogtreecommitdiffstats
path: root/src/xftfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index 695527c4236..c27a4fcf91a 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -280,7 +280,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
280{ 280{
281 FcResult result; 281 FcResult result;
282 Display *display = FRAME_X_DISPLAY (f); 282 Display *display = FRAME_X_DISPLAY (f);
283 Lisp_Object val, filename, index, font_object; 283 Lisp_Object val, filename, idx, font_object;
284 FcPattern *pat = NULL, *match; 284 FcPattern *pat = NULL, *match;
285 struct xftfont_info *xftfont_info = NULL; 285 struct xftfont_info *xftfont_info = NULL;
286 struct font *font; 286 struct font *font;
@@ -298,7 +298,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
298 return Qnil; 298 return Qnil;
299 val = XCDR (val); 299 val = XCDR (val);
300 filename = XCAR (val); 300 filename = XCAR (val);
301 index = XCDR (val); 301 idx = XCDR (val);
302 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 302 size = XINT (AREF (entity, FONT_SIZE_INDEX));
303 if (size == 0) 303 if (size == 0)
304 size = pixel_size; 304 size = pixel_size;
@@ -335,7 +335,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
335 xftfont_add_rendering_parameters (pat, entity); 335 xftfont_add_rendering_parameters (pat, entity);
336 336
337 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); 337 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
338 FcPatternAddInteger (pat, FC_INDEX, XINT (index)); 338 FcPatternAddInteger (pat, FC_INDEX, XINT (idx));
339 339
340 340
341 BLOCK_INPUT; 341 BLOCK_INPUT;
@@ -409,9 +409,9 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
409 spacing = FC_PROPORTIONAL; 409 spacing = FC_PROPORTIONAL;
410 if (! ascii_printable[0]) 410 if (! ascii_printable[0])
411 { 411 {
412 int i; 412 int ch;
413 for (i = 0; i < 95; i++) 413 for (ch = 0; ch < 95; ch++)
414 ascii_printable[i] = ' ' + i; 414 ascii_printable[ch] = ' ' + ch;
415 } 415 }
416 BLOCK_INPUT; 416 BLOCK_INPUT;
417 if (spacing != FC_PROPORTIONAL 417 if (spacing != FC_PROPORTIONAL
@@ -672,7 +672,8 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
672 return len; 672 return len;
673} 673}
674 674
675Lisp_Object 675#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
676static Lisp_Object
676xftfont_shape (Lisp_Object lgstring) 677xftfont_shape (Lisp_Object lgstring)
677{ 678{
678 struct font *font; 679 struct font *font;
@@ -688,6 +689,7 @@ xftfont_shape (Lisp_Object lgstring)
688 XftUnlockFace (xftfont_info->xftfont); 689 XftUnlockFace (xftfont_info->xftfont);
689 return val; 690 return val;
690} 691}
692#endif
691 693
692static int 694static int
693xftfont_end_for_frame (FRAME_PTR f) 695xftfont_end_for_frame (FRAME_PTR f)