summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2011-02-02 11:17:33 +0900
committerKenichi Handa <handa@m17n.org>2011-02-02 11:17:33 +0900
commitf5603be856547bb328fe5a47e6d90bbffff99871 (patch)
treec7ff077a150bec98cbccb2fe086f30c24dd4fa19
parent526dc6aceaad94f091cce663708fb5db22b953cf (diff)
parent2e12d747c6eab0ea5b0886b1f694e601dabeb00f (diff)
downloademacs-f5603be856547bb328fe5a47e6d90bbffff99871.tar.gz
Use FC_DUAL only when it is defined.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/ftfont.c6
-rw-r--r--src/xftfont.c6
3 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6cbc624e914..95c702fecd3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-02 Kenichi Handa <handa@m17n.org>
+
+ * ftfont.c (ftfont_open): Use FC_DUAL only when it is defined.
+
+ * xftfont.c (xftfont_open): Likewise.
+
2011-02-01 Andreas Schwab <schwab@linux-m68k.org>
* window.c (Fselect_window): Add missing return value.
diff --git a/src/ftfont.c b/src/ftfont.c
index e90a2fc5657..6009bd39537 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 35e07da61e3..de2572ce3e6 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;