aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2000-10-21 17:14:43 +0000
committerJason Rumney2000-10-21 17:14:43 +0000
commitf1eed8ff5b6b7b64976b3e27566efa0cd462d934 (patch)
tree245f946caecc8aedc045c288c34e60a53de07892 /src
parentea4233a7410be5faf986ea37ce8d9b934f29fcfc (diff)
downloademacs-f1eed8ff5b6b7b64976b3e27566efa0cd462d934.tar.gz
emacs-f1eed8ff5b6b7b64976b3e27566efa0cd462d934.zip
(w32_cache_char_metrics): Double check that font is
really fixed pitch before trusting tmPitchAndFamily.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.c5
1 files changed, 4 insertions, 1 deletions
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)
1284 } 1284 }
1285 else 1285 else
1286 { 1286 {
1287 if ((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0) 1287 if (((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0)
1288 /* Some fonts (eg DBCS fonts) are marked as fixed width even
1289 though they contain characters of different widths. */
1290 || (font->tm.tmMaxCharWidth != font->tm.tmAveCharWidth))
1288 { 1291 {
1289 /* Font is not fixed pitch, so cache per_char info for the 1292 /* Font is not fixed pitch, so cache per_char info for the
1290 ASCII characters. It would be much more work, and probably 1293 ASCII characters. It would be much more work, and probably