--- mkfont32/win9x/fontmng.cpp 2004/06/06 15:33:09 1.1 +++ mkfont32/win9x/fontmng.cpp 2004/06/10 03:11:47 1.2 @@ -36,6 +36,7 @@ void *fontmng_create(int size, UINT type int fontheight; int weight; DWORD pitch; + int width; if (size < 0) { size *= -1; @@ -46,7 +47,12 @@ void *fontmng_create(int size, UINT type else if (size > 128) { size = 128; } - fontwidth = size; + if (!(type & FDAT_HALFWIDTH)) { + fontwidth = size; + } + else { + fontwidth = (size + 1) / 2; + } fontheight = size; if (type & FDAT_BOLD) { fontwidth++; @@ -72,7 +78,6 @@ void *fontmng_create(int size, UINT type ret->bmpheight = fontheight; ret->bmpalign = (((ret->bmpwidth + 31) / 8) & ~3); - bi = (BITMAPINFO *)(((BYTE *)(ret + 1)) + fontalign); bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi->bmiHeader.biWidth = ret->bmpwidth; @@ -105,7 +110,12 @@ void *fontmng_create(int size, UINT type if (fontface == NULL) { fontface = (type & FDAT_PROPORTIONAL)?deffontface2:deffontface; } - ret->hfont = CreateFont(size, 0, + + width = 0; + if (type & FDAT_HALFWIDTH) { + width = (size + 3) / 4; + } + ret->hfont = CreateFont(size, width, FW_DONTCARE, FW_DONTCARE, weight, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,