From ea2460a0d88ffbc96a8897d754d6cdd08e117ed6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2011 11:15:29 +0900 Subject: [PATCH] Use FC_DUAL only when it is defined. --- src/ChangeLog | 6 ++++++ src/ftfont.c | 6 +++++- src/xftfont.c | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index af76f670e6..8af6bafd90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-02-02 Kenichi Handa + + * ftfont.c (ftfont_open): Use FC_DUAL only when it is defined. + + * xftfont.c (xftfont_open): Likewise. + 2011-01-29 Andreas Schwab * image.c (DEF_IMGLIB_FN): Add parameter rettype, use it instead diff --git a/src/ftfont.c b/src/ftfont.c index e90a2fc565..6009bd3953 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1262,7 +1262,11 @@ ftfont_open (f, entity, pixel_size) spacing = XINT (AREF (entity, FONT_SPACING_INDEX)); else spacing = FC_PROPORTIONAL; - if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) + if (spacing != FC_PROPORTIONAL +#ifdef FC_DUAL + && spacing != FC_DUAL +#endif /* FC_DUAL */ + ) font->min_width = font->average_width = font->space_width = (scalable ? ft_face->max_advance_width * size / upEM : ft_face->size->metrics.max_advance >> 6); diff --git a/src/xftfont.c b/src/xftfont.c index 35e07da61e..de2572ce3e 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -430,7 +430,11 @@ xftfont_open (f, entity, pixel_size) ascii_printable[i] = ' ' + i; } BLOCK_INPUT; - if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) + if (spacing != FC_PROPORTIONAL +#ifdef FC_DUAL + && spacing != FC_DUAL +#endif /* FC_DUAL */ + ) { font->min_width = font->average_width = font->space_width = xftfont->max_advance_width; -- 2.20.1