--- np2/win9x/fontmng.cpp 2005/02/13 05:31:26 1.5 +++ np2/win9x/fontmng.cpp 2006/12/23 12:49:22 1.7 @@ -35,7 +35,8 @@ void *fontmng_create(int size, UINT type int fontwidth; int fontheight; int weight; - UINT pitch; + DWORD pitch; + DWORD charset; if (size < 0) { size *= -1; @@ -92,7 +93,7 @@ void *fontmng_create(int size, UINT type bi->bmiColors[i].rgbReserved = PC_RESERVED; } - hdc = GetDC(NULL); + hdc = GetDC(NULL); ret->hBitmap = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, (void **)&ret->image, NULL, 0); ret->hdcimage = CreateCompatibleDC(hdc); @@ -105,9 +106,10 @@ void *fontmng_create(int size, UINT type if (fontface == NULL) { fontface = (type & FDAT_PROPORTIONAL)?deffontface2:deffontface; } + charset = (type & FDAT_SHIFTJIS)?SHIFTJIS_CHARSET:DEFAULT_CHARSET; ret->hfont = CreateFont(size, 0, FW_DONTCARE, FW_DONTCARE, weight, - FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, + FALSE, FALSE, FALSE, charset, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, NONANTIALIASED_QUALITY, pitch, fontface); ret->hfont = (HFONT)SelectObject(ret->hdcimage, ret->hfont);