Skip bogus d1 operators in Type3-glyphs (issue 14953)

In the `src/display/canvas.js` code the `d1` operator will be used to set the clipping region, and it obviously cannot be empty since that prevents the Type3-glyph from rendering.

Also, the patch removes an outdated comment; refer to PR 12718.
This commit is contained in:
Jonas Jenwald 2022-05-24 12:12:53 +02:00
parent 61012b931c
commit 5a2899c57e
5 changed files with 20 additions and 6 deletions

View file

@ -2652,8 +2652,6 @@ class CanvasGraphics {
}
setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {
// TODO According to the spec we're also suppose to ignore any operators
// that set color or include images while processing this type3 font.
this.ctx.rect(llx, lly, urx - llx, ury - lly);
this.ctx.clip();
this.endPath();