--- np2/wince/fontmng.cpp 2003/12/01 21:15:13 1.3 +++ np2/wince/fontmng.cpp 2005/02/09 20:11:37 1.6 @@ -6,8 +6,8 @@ #if defined(FONTMNG_CACHE) typedef struct { - WORD str; - WORD next; + UINT16 str; + UINT16 next; } FNTCTBL; #endif @@ -29,8 +29,8 @@ typedef struct { int bmpalign; #if defined(FONTMNG_CACHE) - DWORD caches; - DWORD cachehead; + UINT caches; + UINT cachehead; FNTCTBL cache[FONTMNG_CACHE]; #endif } _FNTMNG, *FNTMNG; @@ -208,7 +208,7 @@ int fontmng_getpoint(void *hdl) { return(0); } -#ifdef _WIN32_WCE +#ifdef UNICODE static void getlength1(FNTMNG fhdl, FNTDAT fdat, LPCTSTR string, int tleng, int length) { @@ -223,7 +223,11 @@ static void getlength1(FNTMNG fhdl, FNTD fdat->height = fhdl->bmpheight >> 1; } else { +#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; } @@ -615,7 +619,7 @@ FNTDAT fontmng_get(void *hdl, const char } if (prev < FONTMNG_CACHE) { fct[prev].next = fct[pos].next; - fct[pos].next = (WORD)fhdl->cachehead; + fct[pos].next = (UINT16)fhdl->cachehead; fhdl->cachehead = pos; } return((FNTDAT)(((BYTE *)(fhdl + 1)) + (pos * fhdl->fontalign))); @@ -624,8 +628,8 @@ FNTDAT fontmng_get(void *hdl, const char prev = fhdl->caches; fhdl->caches++; } - fct[prev].str = (WORD)str; - fct[prev].next = (WORD)fhdl->cachehead; + fct[prev].str = (UINT16)str; + fct[prev].next = (UINT16)fhdl->cachehead; fhdl->cachehead = prev; fdat = (FNTDAT)(((BYTE *)(fhdl + 1)) + (prev * fhdl->fontalign)); }