changeset 32727:3ecb42f00b85

(w32_cache_char_metrics): Double check that font is really fixed pitch before trusting tmPitchAndFamily.
author Jason Rumney <jasonr@gnu.org>
date Sat, 21 Oct 2000 17:14:43 +0000
parents 7235706eca00
children 6fe525e8880c
files src/w32term.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Sat Oct 21 17:12:26 2000 +0000
+++ b/src/w32term.c	Sat Oct 21 17:14:43 2000 +0000
@@ -1284,7 +1284,10 @@
     }
   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