Subject: | i_t1_bbox() doesn't convert from UTF8 to SBCS when calculating the advance width |
The following code from font.c:
if (utf8) {
int worklen;
char *work = t1_from_utf8(str, len, &worklen);
bbox = T1_GetStringBBox(fontnum,work,worklen,0,mod_flags);
myfree(work);
}
else {
bbox = T1_GetStringBBox(fontnum,(char *)str,len,0,mod_flags);
}
gbbox = T1_GetFontBBox(fontnum);
advance = T1_GetStringWidth(fontnum, (char *)str, len, 0, mod_flags);
Note that we convert from utf8 to single byte characters to calculate
the bounding box, but don't use that converted string for the advance width.