--- np2/wince/fontmng.cpp 2003/10/16 17:59:33 1.1 +++ np2/wince/fontmng.cpp 2004/06/14 13:35:40 1.5 @@ -188,7 +188,6 @@ void *fontmng_create(int size, UINT type return(ret); } - void fontmng_destroy(void *hdl) { FNTMNG fhdl; @@ -202,8 +201,14 @@ void fontmng_destroy(void *hdl) { } } +int fontmng_getpoint(void *hdl) { -#ifdef _WIN32_WCE + if (hdl) { + } + return(0); +} + +#ifdef UNICODE static void getlength1(FNTMNG fhdl, FNTDAT fdat, LPCTSTR string, int tleng, int length) { @@ -218,9 +223,12 @@ static void getlength1(FNTMNG fhdl, FNTD fdat->height = fhdl->bmpheight >> 1; } else { - fntsize.cx = min(fntsize.cx, fhdl->bmpwidth); - fdat->width = fntsize.cx; - fdat->pitch = fntsize.cx; +#if 1 // PocketPCのみ戻り値が変らしい? + fdat->width = min(fntsize.cx, fhdl->bmpwidth); +#else + fdat->width = min(fntsize.cx + 1, fhdl->bmpwidth); +#endif + fdat->pitch = min(fntsize.cx, fhdl->bmpwidth); fdat->height = fhdl->bmpheight; } } @@ -258,7 +266,6 @@ static void fontmng_getchar(FNTMNG fhdl, getlength1(fhdl, fdat, txtwork, len, leng); } - BOOL fontmng_getsize(void *hdl, const char *string, POINT_T *pt) { TCHAR txtwork[4]; @@ -268,11 +275,10 @@ BOOL fontmng_getsize(void *hdl, const ch DWORD len; int leng; - width = 0; if ((hdl == NULL) || (string == NULL)) { goto fmgs_exit; } - + width = 0; buf[2] = '\0'; do { buf[0] = *string++; @@ -306,7 +312,6 @@ fmgs_exit: return(FAILURE); } - BOOL fontmng_getdrawsize(void *hdl, const char *string, POINT_T *pt) { TCHAR txtwork[4]; @@ -357,7 +362,6 @@ fmgds_exit: return(FAILURE); } - #else static void getlength1(FNTMNG fhdl, FNTDAT fdat, @@ -398,7 +402,6 @@ static void getlength1(FNTMNG fhdl, FNTD } } - static void fontmng_getchar(FNTMNG fhdl, FNTDAT fdat, const char *string) { int leng; @@ -410,7 +413,6 @@ static void fontmng_getchar(FNTMNG fhdl, getlength1(fhdl, fdat, string, leng); } - BOOL fontmng_getsize(void *hdl, const char *string, POINT_T *pt) { char buf[4]; @@ -454,7 +456,6 @@ fmgs_exit: return(FAILURE); } - BOOL fontmng_getdrawsize(void *hdl, const char *string, POINT_T *pt) { char buf[4]; @@ -502,7 +503,6 @@ fmgds_exit: } #endif - static void fontmng_setpat(FNTMNG fhdl, FNTDAT fdat) { DWORD remx; @@ -586,7 +586,6 @@ fmsp_end: return; } - FNTDAT fontmng_get(void *hdl, const char *string) { FNTMNG fhdl;