Commit a6fffcdc authored by Steven Tamm's avatar Steven Tamm
Browse files

* macterm.c (XLoadQueryFont): Correctly handle 0 size

	font widths that are returned from some Japanese fonts.
parent 112d84ef
2005-01-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c (XLoadQueryFont): Correctly handle 0 size
font widths that are returned from some Japanese fonts.
2005-01-06 Kim F. Storm <storm@cua.dk>
 
* fringe.c (fringe_faces): Change to Lisp_Object pointer.
......
......@@ -6715,14 +6715,19 @@ XLoadQueryFont (Display *dpy, char *fontname)
char_width = CharWidth (c);
font->per_char[c - 0x20].width = char_width;
font->per_char[c - 0x20].rbearing = char_width;
min_width = min (min_width, char_width);
max_width = max (max_width, char_width);
}
/* Some Japanese fonts (in SJIS encoding) return 0 as the
character width of 0x7f. */
if (char_width > 0)
{
min_width = min (min_width, char_width);
max_width = max (max_width, char_width);
}
}
font->min_bounds.width = min_width;
font->max_bounds.width = max_width;
}
}
TextFont (old_fontnum); /* restore previous font number, size and face */
TextSize (old_fontsize);
TextFace (old_fontface);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment