Skip to content

Incorrect actualBoundingBoxLeft with negative value #65

Description

@lhapaipai

Hi !

For common glyphs like "P" where actualBoundingBoxLeft is negative (the ink starts slightly to the right of the drawing origin, due to left sidebearing), the rasterized pixels were placed at the wrong position in the output buffer.

Fix: correct the sign of actualBoundingBoxLeft in both the width calculation and the fillText position.

Reproduction:

Actual:

Image

Wanted:

Image

Explanation

actualBoundingBoxLeft is -12px. p is 12px at the right of the origin.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions