From: Jason Rumney Date: Sat, 21 Oct 2000 17:14:43 +0000 (+0000) Subject: (w32_cache_char_metrics): Double check that font is X-Git-Tag: emacs-pretest-21.0.90~697 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1eed8ff5b6b7b64976b3e27566efa0cd462d934;p=emacs.git (w32_cache_char_metrics): Double check that font is really fixed pitch before trusting tmPitchAndFamily. --- diff --git a/src/w32term.c b/src/w32term.c index c20e470037a..d6bff6e32e4 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1284,7 +1284,10 @@ w32_cache_char_metrics (font) } else { - if ((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0) + if (((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0) + /* Some fonts (eg DBCS fonts) are marked as fixed width even + though they contain characters of different widths. */ + || (font->tm.tmMaxCharWidth != font->tm.tmAveCharWidth)) { /* Font is not fixed pitch, so cache per_char info for the ASCII characters. It would be much more work, and probably