Skip to content

Commit 45cbe8b

Browse files
Merge pull request #19735 from Snuffleupagus/Type3WordSpacing
Apply char/word-spacing correctly for missing Type3-glyphs
2 parents 1ccc82b + 6676457 commit 45cbe8b

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/display/canvas.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -2264,9 +2264,7 @@ class CanvasGraphics {
22642264
const operatorList = font.charProcOperatorList[glyph.operatorListId];
22652265
if (!operatorList) {
22662266
warn(`Type3 character "${glyph.operatorListId}" is not available.`);
2267-
continue;
2268-
}
2269-
if (this.contentVisible) {
2267+
} else if (this.contentVisible) {
22702268
this.processingType3 = glyph;
22712269
this.save();
22722270
ctx.scale(fontSize, fontSize);

test/pdfs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
!issue4706.pdf
191191
!rotation.pdf
192192
!simpletype3font.pdf
193+
!Type3WordSpacing.pdf
193194
!sizes.pdf
194195
!javauninstall-7r.pdf
195196
!file_url_link.pdf

test/pdfs/Type3WordSpacing.pdf

2.63 KB
Binary file not shown.

test/test_manifest.json

+8
Original file line numberDiff line numberDiff line change
@@ -2843,6 +2843,14 @@
28432843
"lastPage": 1,
28442844
"type": "eq"
28452845
},
2846+
{
2847+
"id": "Type3WordSpacing",
2848+
"file": "pdfs/Type3WordSpacing.pdf",
2849+
"md5": "8c75440e5b95cf521d186f862b404516",
2850+
"link": false,
2851+
"rounds": 1,
2852+
"type": "eq"
2853+
},
28462854
{
28472855
"id": "issue13372",
28482856
"file": "pdfs/issue13372.pdf",

0 commit comments

Comments
 (0)