From: Jason Rumney Date: Sun, 29 Oct 2000 21:00:37 +0000 (+0000) Subject: (set_bdf_font_info): Set it. X-Git-Tag: emacs-pretest-21.0.90~438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=691a3cb77b362b2d57800dd7a20f03d3663a9f09;p=emacs.git (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. --- diff --git a/src/w32bdf.c b/src/w32bdf.c index 8008e8b4b4e..53e1b17b218 100644 --- a/src/w32bdf.c +++ b/src/w32bdf.c @@ -211,6 +211,7 @@ set_bdf_font_info(bdffont *fontp) 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 @@ w32_BDF_TextOut(bdffont *fontp, HDC hdc, int left, { 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 @@ struct font_info *w32_load_bdf_font (struct frame *f, char *fontname, 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);