Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 20554
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: TONYC [...] cpan.org
Requestors: TONYC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.51
Fixed in: 0.52



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.
Fixed in Imager 0.52.