changeset 33038:5a1e3282fe2e

(set_bdf_font_info): Set it. (w32_BDF_TextOut): Swap byte order of double byte characters. (w32_load_bdf_font): Set double_byte_p based on bdf_font->nchars.
author Jason Rumney <jasonr@gnu.org>
date Sun, 29 Oct 2000 21:00:37 +0000
parents 365605845e33
children 075469a2c1c4
files src/w32bdf.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32bdf.c	Sun Oct 29 20:59:47 2000 +0000
+++ b/src/w32bdf.c	Sun Oct 29 21:00:37 2000 +0000
@@ -211,6 +211,7 @@
   start = q;
   flag = proceed_file_line("CHARS", start, &len, &p, &q);
   if (!flag) return 0;
+  fontp->nchars = atoi(p);
   fontp->seeked = q;
 
   return 1;
@@ -649,7 +650,7 @@
 	{
 	  bytelen -= 2;
 	  if (bytelen < 0) break;
-	  index = MAKELENDSHORT(textp[1], textp[0]);
+	  index = MAKELENDSHORT(textp[0], textp[1]);
 	  textp += 2;
 	}
       pcb = get_bitmap_with_cache(fontp, index);
@@ -722,8 +723,9 @@
   font->bdf = bdf_font;
   font->hfont = 0;
 
-  /* NTEMACS_TODO: Recognize DBCS fonts. */
-  font->double_byte_p = 0;
+  /* NTEMACS_TODO: Better way of determining if a font is double byte
+     or not. */
+  font->double_byte_p = bdf_font->nchars > 255 ? 1 : 0;
 
   w32_cache_char_metrics (font);