Skip to content

Commit

Permalink
fix: fontkit switch scoped vars (#1860)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomura committed Jun 4, 2022
1 parent 810f459 commit 89b8059
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-rings-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/fontkit': patch
---

fix: fontkit switch scoped vars
4 changes: 2 additions & 2 deletions packages/fontkit/src/glyph/CFFGlyph.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export default class CFFGlyph extends Glyph {
break;

case 10: // callsubr
let index = stack.pop() + subrsBias;
let subr = subrs[index];
var index = stack.pop() + subrsBias;
var subr = subrs[index];
if (subr) {
usedSubrs[index] = true;
var p = stream.pos;
Expand Down

0 comments on commit 89b8059

Please sign in to comment.