| version 1.2, 2004/08/09 04:47:53 | version 1.4, 2008/06/02 20:07:31 | 
| Line 1 | Line 1 | 
 | #include        "compiler.h" | #include        "compiler.h" | 
 | #include        "parts.h" | #include        "parts.h" | 
 | #include        "dosio.h" | #include        "dosio.h" | 
 |  | #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | 
 |  | #include        "oemtext.h" | 
 |  | #endif | 
 | #include        "fontmng.h" | #include        "fontmng.h" | 
 | #include        "font.h" | #include        "font.h" | 
 | #include        "fontdata.h" | #include        "fontdata.h" | 
| Line 13  typedef struct { | Line 16  typedef struct { | 
 | } JISPAIR; | } JISPAIR; | 
 |  |  | 
 | static const UINT8 deltable[] = { | static const UINT8 deltable[] = { | 
| //     del         del         del         del         del | /*     del         del         del         del         del */ | 
 | 0x0f, 0x5f, 0, | 0x0f, 0x5f, 0, | 
 | 0x01, 0x10, 0x1a, 0x21, 0x3b, 0x41, 0x5b, 0x5f, 0, | 0x01, 0x10, 0x1a, 0x21, 0x3b, 0x41, 0x5b, 0x5f, 0, | 
 | 0x54, 0x5f, 0, | 0x54, 0x5f, 0, | 
| Line 134  const UINT8 *p; | Line 137  const UINT8 *p; | 
 | int             height; | int             height; | 
 | UINT8   bit; | UINT8   bit; | 
 | int             i; | int             i; | 
 |  | #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | 
 |  | OEMCHAR oemwork[4]; | 
 |  | #endif | 
 |  |  | 
 | ptr += from * 16; | ptr += from * 16; | 
 | work[1] = '\0'; | work[1] = '\0'; | 
 | while(from < to) { | while(from < to) { | 
 | work[0] = (char)from; | work[0] = (char)from; | 
 |  | #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | 
 |  | oemtext_sjis2oem(oemwork, NELEMENTS(oemwork), work, -1); | 
 |  | dat = fontmng_get(fnt, oemwork); | 
 |  | #else | 
 | dat = fontmng_get(fnt, work); | dat = fontmng_get(fnt, work); | 
 |  | #endif | 
 | if (dat) { | if (dat) { | 
 | width = min(dat->width, 8); | width = min(dat->width, 8); | 
 | height = min(dat->height, 16); | height = min(dat->height, 16); | 
| Line 176  static void setjis(UINT8 *ptr, void *fnt | Line 187  static void setjis(UINT8 *ptr, void *fnt | 
 | const UINT8     *p; | const UINT8     *p; | 
 | UINT    bit; | UINT    bit; | 
 | int             i; | int             i; | 
 |  | #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | 
 |  | OEMCHAR oemwork[4]; | 
 |  | #endif | 
 |  |  | 
 | work[2] = '\0'; | work[2] = '\0'; | 
 | for (h=0x21; h<0x7f; h++) { | for (h=0x21; h<0x7f; h++) { | 
| Line 200  const UINT8 *p; | Line 214  const UINT8 *p; | 
 | sjis = jis2sjis(jis); | sjis = jis2sjis(jis); | 
 | work[0] = (char)(sjis >> 8); | work[0] = (char)(sjis >> 8); | 
 | work[1] = (char)sjis; | work[1] = (char)sjis; | 
 |  | #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | 
 |  | oemtext_sjis2oem(oemwork, NELEMENTS(oemwork), work, -1); | 
 |  | dat = fontmng_get(fnt, oemwork); | 
 |  | #else | 
 | dat = fontmng_get(fnt, work); | dat = fontmng_get(fnt, work); | 
 |  | #endif | 
 | if (dat) { | if (dat) { | 
 | width = min(dat->width, 16); | width = min(dat->width, 16); | 
 | height = min(dat->height, 16); | height = min(dat->height, 16); |