aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/macterm.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7b8e2a320eb..38317b9e8f6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12005-01-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * macterm.c (XLoadQueryFont): Correctly handle 0 size
4 font widths that are returned from some Japanese fonts.
5
12005-01-06 Kim F. Storm <storm@cua.dk> 62005-01-06 Kim F. Storm <storm@cua.dk>
2 7
3 * fringe.c (fringe_faces): Change to Lisp_Object pointer. 8 * fringe.c (fringe_faces): Change to Lisp_Object pointer.
diff --git a/src/macterm.c b/src/macterm.c
index 4d80fbac5fa..566f0c5b04b 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -6715,14 +6715,19 @@ XLoadQueryFont (Display *dpy, char *fontname)
6715 char_width = CharWidth (c); 6715 char_width = CharWidth (c);
6716 font->per_char[c - 0x20].width = char_width; 6716 font->per_char[c - 0x20].width = char_width;
6717 font->per_char[c - 0x20].rbearing = char_width; 6717 font->per_char[c - 0x20].rbearing = char_width;
6718 min_width = min (min_width, char_width); 6718 /* Some Japanese fonts (in SJIS encoding) return 0 as the
6719 max_width = max (max_width, char_width); 6719 character width of 0x7f. */
6720 } 6720 if (char_width > 0)
6721 {
6722 min_width = min (min_width, char_width);
6723 max_width = max (max_width, char_width);
6724 }
6725 }
6721 font->min_bounds.width = min_width; 6726 font->min_bounds.width = min_width;
6722 font->max_bounds.width = max_width; 6727 font->max_bounds.width = max_width;
6723 } 6728 }
6724 } 6729 }
6725 6730
6726 TextFont (old_fontnum); /* restore previous font number, size and face */ 6731 TextFont (old_fontnum); /* restore previous font number, size and face */
6727 TextSize (old_fontsize); 6732 TextSize (old_fontsize);
6728 TextFace (old_fontface); 6733 TextFace (old_fontface);