rem: w1=wTextWidth(font->font, text, p); if (w1>width) {
add: w1 = WMWidthOfString(font, text, p); if (w1 > width) {
context: ShrinkString(WFont *font, char *string, int width){#ifndef I18N_MB    int w, w1=0;    int p;    char *pos;    char *text;    int p1, p2, t;#endif#ifdef I18N_MB    return wstrdup(string);#else    p = strlen(string);    w = wTextWidth(font->font, string, p);    text = wmalloc(strlen(string)+8);    strcpy(text, string);    if (w<=width)      return text;    pos = strchr(text, ' ');    if (!pos)      pos = strchr(text, ':');    if (pos) {	*pos = 0;	p = strlen(text);	w1=wTextWidth(font->font, text, p);	if (w1>width) {	    w1 = 0;	    p = 0;	    *pos = ' ';	    *text = 0;	} else {	    *pos = 0;	    width -= w1;	    p++;	}	string += p;	p=strlen(string);    } else {	*text=0;    }    strcat(text, "...");    width -= wTextWidth(font->font, "...", 3);        pos = string;    p1=0;    p2=p;    t = (p2-p1)/2;    while (p2>p1 && p1!=t) {	w = wTextWidth(font->font, &string[p-t], t);	if (w>width) {	    p2 = t;	    t = p1+(p2-p1)/2;	} else if (w<width) {	    p1 = t;	    t = p1+(p2-p1)/2;	} else 	  p2=p1=t;    }    strcat(text, &string[p-p1]);    return text;#endif /* I18N_MB */}