diff options
| author | Jason Rumney | 2000-10-29 21:00:37 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-10-29 21:00:37 +0000 |
| commit | 691a3cb77b362b2d57800dd7a20f03d3663a9f09 (patch) | |
| tree | 34d3437130aa802f9b87c78db56b97c80a7ada17 /src | |
| parent | 00c9699523b536c635deaa1a509ec3abc874e606 (diff) | |
| download | emacs-691a3cb77b362b2d57800dd7a20f03d3663a9f09.tar.gz emacs-691a3cb77b362b2d57800dd7a20f03d3663a9f09.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32bdf.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) | |||
| 211 | start = q; | 211 | start = q; |
| 212 | flag = proceed_file_line("CHARS", start, &len, &p, &q); | 212 | flag = proceed_file_line("CHARS", start, &len, &p, &q); |
| 213 | if (!flag) return 0; | 213 | if (!flag) return 0; |
| 214 | fontp->nchars = atoi(p); | ||
| 214 | fontp->seeked = q; | 215 | fontp->seeked = q; |
| 215 | 216 | ||
| 216 | return 1; | 217 | return 1; |
| @@ -649,7 +650,7 @@ w32_BDF_TextOut(bdffont *fontp, HDC hdc, int left, | |||
| 649 | { | 650 | { |
| 650 | bytelen -= 2; | 651 | bytelen -= 2; |
| 651 | if (bytelen < 0) break; | 652 | if (bytelen < 0) break; |
| 652 | index = MAKELENDSHORT(textp[1], textp[0]); | 653 | index = MAKELENDSHORT(textp[0], textp[1]); |
| 653 | textp += 2; | 654 | textp += 2; |
| 654 | } | 655 | } |
| 655 | pcb = get_bitmap_with_cache(fontp, index); | 656 | pcb = get_bitmap_with_cache(fontp, index); |
| @@ -722,8 +723,9 @@ struct font_info *w32_load_bdf_font (struct frame *f, char *fontname, | |||
| 722 | font->bdf = bdf_font; | 723 | font->bdf = bdf_font; |
| 723 | font->hfont = 0; | 724 | font->hfont = 0; |
| 724 | 725 | ||
| 725 | /* NTEMACS_TODO: Recognize DBCS fonts. */ | 726 | /* NTEMACS_TODO: Better way of determining if a font is double byte |
| 726 | font->double_byte_p = 0; | 727 | or not. */ |
| 728 | font->double_byte_p = bdf_font->nchars > 255 ? 1 : 0; | ||
| 727 | 729 | ||
| 728 | w32_cache_char_metrics (font); | 730 | w32_cache_char_metrics (font); |
| 729 | 731 | ||