Moriyoshi Koizumi
moriy****@sourc*****
2004年 7月 5日 (月) 03:10:08 JST
moriyoshi 04/07/05 03:10:08 Modified: mbfl mbfilter.c Log: - Changed mbfl_strimwidth to honor Unicode property also. Revision Changes Path 1.29 +2 -7 libmbfl/mbfl/mbfilter.c Index: mbfilter.c =================================================================== RCS file: /cvsroot/php-i18n/libmbfl/mbfl/mbfilter.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- mbfilter.c 29 Jun 2004 12:10:56 -0000 1.28 +++ mbfilter.c 4 Jul 2004 18:10:08 -0000 1.29 @@ -1108,13 +1108,8 @@ break; default: if (pc->outchar >= pc->from) { - if (c >= 0x20) { - if (c < 0x2000 || (c > 0xff60 && c < 0xffa0)) { - pc->outwidth++; - } else { - pc->outwidth += 2; - } - } + pc->outwidth += (is_fullwidth(c) ? 2: 1); + if (pc->outwidth > pc->width) { if (pc->status == 0) { pc->endpos = pc->device.pos;