(w32_per_char_metric): Allow cached metrics to be
authorJason Rumney <jasonr@gnu.org>
Sun, 31 Aug 2003 22:15:15 +0000 (22:15 +0000)
committerJason Rumney <jasonr@gnu.org>
Sun, 31 Aug 2003 22:15:15 +0000 (22:15 +0000)
returned even when font_type is unknown.

src/ChangeLog
src/w32term.c

index 394a6b1..a3cfba0 100644 (file)
@@ -1,5 +1,8 @@
 2003-08-31  Jason Rumney  <jasonr@gnu.org>
 
+       * w32term.c (w32_per_char_metric): Allow cached metrics to be
+       returned even when font_type is unknown.
+
        * xdisp.c (init_iterator): Remove old WINDOWSNT conditional.
 
 2003-08-30  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
index d98f93e..16e0f46 100644 (file)
@@ -895,7 +895,6 @@ w32_per_char_metric (font, char2b, font_type)
   BOOL retval;
 
   xassert (font && char2b);
-  xassert (font_type != UNKNOWN_FONT);
 
   /* Handle the common cases quickly.  */
   if (!font->bdf && font->per_char == NULL)
@@ -904,6 +903,8 @@ w32_per_char_metric (font, char2b, font_type)
   else if (!font->bdf && *char2b < 128)
     return &font->per_char[*char2b];
 
+  xassert (font_type != UNKNOWN_FONT);
+
   pcm = &font->scratch;
 
   if (font_type == BDF_1D_FONT)