changeset 34112:adfe753a8c4e

(w32_bdf_per_char_metric): Dereference pointer correctly for single byte character case. (w32_per_char_metric): Do not try to make any assumptions about the metrics of BDF fonts.
author Jason Rumney <jasonr@gnu.org>
date Sat, 02 Dec 2000 14:38:57 +0000
parents d7313a38fa5b
children fa597347c65f
files src/w32term.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Sat Dec 02 11:29:40 2000 +0000
+++ b/src/w32term.c	Sat Dec 02 14:38:57 2000 +0000
@@ -1143,7 +1143,7 @@
   char buf[2];
 
   if (dim == 1)
-    buf[0] = (char)char2b;
+    buf[0] = (char)(*char2b);
   else
     {
       buf[0] = BYTE1 (*char2b);
@@ -1260,10 +1260,10 @@
   xassert (font_type != UNKNOWN_FONT);
 
   /* Handle the common cases quickly.  */
-  if (font->per_char == NULL)
+  if (!font->bdf && font->per_char == NULL)
     /* TODO: determine whether char2b exists in font?  */
     return &font->max_bounds;
-  else if (*char2b < 128)
+  else if (!font->bdf && *char2b < 128)
     return &font->per_char[*char2b];
 
   pcm = &font->scratch;