aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2004-03-04 12:43:44 +0000
committerKenichi Handa2004-03-04 12:43:44 +0000
commitfaea53fd50000a1c319f6a5b82a95c62ea2f053a (patch)
tree0bd20f2999963d1ed286f0c91276a7f274393036 /src
parentbb229eecd916a8d07cd4477ccb3f5816a5581e59 (diff)
downloademacs-faea53fd50000a1c319f6a5b82a95c62ea2f053a.tar.gz
emacs-faea53fd50000a1c319f6a5b82a95c62ea2f053a.zip
(x_list_fonts): Fix the detection of an auto-scaled font.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4ed246183ae..82aed60fbd6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9576,8 +9576,9 @@ x_list_fonts (f, pattern, size, maxnames)
9576 int average_width = -1, resx = 0, dashes = 0; 9576 int average_width = -1, resx = 0, dashes = 0;
9577 9577
9578 /* Count the number of dashes in NAMES[I]. If there are 9578 /* Count the number of dashes in NAMES[I]. If there are
9579 14 dashes, the field value following 9th dash 9579 14 dashes, the field value following 7th dash
9580 (RESOLUTION_X) is nonzero, and the field value 9580 (PIXEL_SIZE) is zero, the field value following 9th
9581 dash (RESOLUTION_X) is nonzero, and the field value
9581 following 12th dash (AVERAGE_WIDTH) is 0, this is a 9582 following 12th dash (AVERAGE_WIDTH) is 0, this is a
9582 auto-scaled font which is usually too ugly to be used 9583 auto-scaled font which is usually too ugly to be used
9583 for editing. Let's ignore it. */ 9584 for editing. Let's ignore it. */
@@ -9594,7 +9595,8 @@ x_list_fonts (f, pattern, size, maxnames)
9594 } 9595 }
9595 9596
9596 if (allow_auto_scaled_font 9597 if (allow_auto_scaled_font
9597 || dashes < 14 || average_width != 0 || resx == 0) 9598 || dashes < 14
9599 || ! (width == 0 && resx != 0 && average_width == 0))
9598 { 9600 {
9599 tem = build_string (names[i]); 9601 tem = build_string (names[i]);
9600 if (NILP (Fassoc (tem, list))) 9602 if (NILP (Fassoc (tem, list)))