From f1eed8ff5b6b7b64976b3e27566efa0cd462d934 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 21 Oct 2000 17:14:43 +0000 Subject: [PATCH] (w32_cache_char_metrics): Double check that font is really fixed pitch before trusting tmPitchAndFamily. --- src/w32term.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5