Skip to content

Commit fc49858

Browse files
committed
Avoid exception when trying to render some glyphs contours
It fixes #20513.
1 parent 509fcc8 commit fc49858

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/display/font_loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ class FontFaceObject {
436436
} catch (ex) {
437437
warn(`getPathGenerator - ignoring character: "${ex}".`);
438438
}
439-
const path = makePathFromDrawOPS(cmds.path);
439+
const path = makePathFromDrawOPS(cmds?.path);
440440

441441
if (!this.fontExtraProperties) {
442442
// Remove the raw path-string, since we don't need it anymore.

test/pdfs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,4 +765,5 @@
765765
!two_paragraphs.pdf
766766
!paragraph_and_link.pdf
767767
!issue20225.pdf
768+
!issue20513.pdf
768769
!issue20516.pdf

test/pdfs/issue20513.pdf

1.1 MB
Binary file not shown.

test/test_manifest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13099,5 +13099,12 @@
1309913099
"enableXfa": true,
1310013100
"lastPage": 1,
1310113101
"type": "eq"
13102+
},
13103+
{
13104+
"id": "issue20513",
13105+
"file": "pdfs/issue20513.pdf",
13106+
"md5": "19a3a347773518242fa3cf1c04a9a1e4",
13107+
"rounds": 1,
13108+
"type": "eq"
1310213109
}
1310313110
]

0 commit comments

Comments
 (0)