|
|
| version 1.2, 2003/11/21 09:28:02 | version 1.6, 2005/02/09 20:11:37 |
|---|---|
| Line 6 | Line 6 |
| #if defined(FONTMNG_CACHE) | #if defined(FONTMNG_CACHE) |
| typedef struct { | typedef struct { |
| WORD str; | UINT16 str; |
| WORD next; | UINT16 next; |
| } FNTCTBL; | } FNTCTBL; |
| #endif | #endif |
| Line 29 typedef struct { | Line 29 typedef struct { |
| int bmpalign; | int bmpalign; |
| #if defined(FONTMNG_CACHE) | #if defined(FONTMNG_CACHE) |
| DWORD caches; | UINT caches; |
| DWORD cachehead; | UINT cachehead; |
| FNTCTBL cache[FONTMNG_CACHE]; | FNTCTBL cache[FONTMNG_CACHE]; |
| #endif | #endif |
| } _FNTMNG, *FNTMNG; | } _FNTMNG, *FNTMNG; |
| Line 208 int fontmng_getpoint(void *hdl) { | Line 208 int fontmng_getpoint(void *hdl) { |
| return(0); | return(0); |
| } | } |
| #ifdef _WIN32_WCE | #ifdef UNICODE |
| static void getlength1(FNTMNG fhdl, FNTDAT fdat, LPCTSTR string, | static void getlength1(FNTMNG fhdl, FNTDAT fdat, LPCTSTR string, |
| int tleng, int length) { | int tleng, int length) { |
| Line 223 static void getlength1(FNTMNG fhdl, FNTD | Line 223 static void getlength1(FNTMNG fhdl, FNTD |
| fdat->height = fhdl->bmpheight >> 1; | fdat->height = fhdl->bmpheight >> 1; |
| } | } |
| else { | else { |
| fntsize.cx = min(fntsize.cx, fhdl->bmpwidth); | #if 1 // PocketPCのみ戻り値が変らしい? |
| fdat->width = fntsize.cx; | fdat->width = min(fntsize.cx, fhdl->bmpwidth); |
| fdat->pitch = fntsize.cx; | #else |
| fdat->width = min(fntsize.cx + 1, fhdl->bmpwidth); | |
| #endif | |
| fdat->pitch = min(fntsize.cx, fhdl->bmpwidth); | |
| fdat->height = fhdl->bmpheight; | fdat->height = fhdl->bmpheight; |
| } | } |
| } | } |
| Line 616 FNTDAT fontmng_get(void *hdl, const char | Line 619 FNTDAT fontmng_get(void *hdl, const char |
| } | } |
| if (prev < FONTMNG_CACHE) { | if (prev < FONTMNG_CACHE) { |
| fct[prev].next = fct[pos].next; | fct[prev].next = fct[pos].next; |
| fct[pos].next = (WORD)fhdl->cachehead; | fct[pos].next = (UINT16)fhdl->cachehead; |
| fhdl->cachehead = pos; | fhdl->cachehead = pos; |
| } | } |
| return((FNTDAT)(((BYTE *)(fhdl + 1)) + (pos * fhdl->fontalign))); | return((FNTDAT)(((BYTE *)(fhdl + 1)) + (pos * fhdl->fontalign))); |
| Line 625 FNTDAT fontmng_get(void *hdl, const char | Line 628 FNTDAT fontmng_get(void *hdl, const char |
| prev = fhdl->caches; | prev = fhdl->caches; |
| fhdl->caches++; | fhdl->caches++; |
| } | } |
| fct[prev].str = (WORD)str; | fct[prev].str = (UINT16)str; |
| fct[prev].next = (WORD)fhdl->cachehead; | fct[prev].next = (UINT16)fhdl->cachehead; |
| fhdl->cachehead = prev; | fhdl->cachehead = prev; |
| fdat = (FNTDAT)(((BYTE *)(fhdl + 1)) + (prev * fhdl->fontalign)); | fdat = (FNTDAT)(((BYTE *)(fhdl + 1)) + (prev * fhdl->fontalign)); |
| } | } |