[poppler] About a few statements in CairoFontEngine.cc

Lu Wang coolwanglu at gmail.com
Sat Sep 21 01:46:17 PDT 2013


Here's a patch for this issue.

The old code is apparent wrong, since extents->height is always 0
AFAIK, the order of fontBBox is [x1 y1 x2 y2], and the patch fixes it
accordingly.


regards,
- Lu Wang




On Thu, Sep 19, 2013 at 4:19 PM, Lu Wang <coolwanglu at gmail.com> wrote:

> Hi all,
>
>
>    While reading CairoFontEngine.cc, I found the following lines around
> line 600:
>
>    extents->ascent = mat[3]; /* y2 */
>   extents->descent = -mat[3]; /* -y1 */
>   extents->height = extents->ascent + extents->descent;
>   extents->max_x_advance = mat[2] - mat[1]; /* x2 - x1 */
>   extents->max_y_advance = 0;
>
>
>   The indices of mat[] looks suspicious to me, seems that they are not
> matching the comments nor the fields of extents.
>
>   Can any one please verify this?
>
>   Thanks!
>
>
>   regards,
>   - Lu Wang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20130921/2d845b0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wl.patch
Type: application/octet-stream
Size: 650 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20130921/2d845b0e/attachment.obj>


More information about the poppler mailing list