]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_cache_char_metrics): Double check that font is
authorJason Rumney <jasonr@gnu.org>
Sat, 21 Oct 2000 17:14:43 +0000 (17:14 +0000)
committerJason Rumney <jasonr@gnu.org>
Sat, 21 Oct 2000 17:14:43 +0000 (17:14 +0000)
really fixed pitch before trusting tmPitchAndFamily.

src/w32term.c

index c20e470037a5304bb6f823499c4d6d9a76f9fa81..d6bff6e32e441d702437f35572cb655ec0e73904 100644 (file)
@@ -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