diff --git a/src/core/fonts.js b/src/core/fonts.js
index e6a5072cf..3504ce518 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -2286,7 +2286,7 @@ var Font = (function FontClosure() {
           assert(cid <= 0xffff, 'Max size of CID is 65,535');
           var glyphId = -1;
           if (isCidToGidMapEmpty) {
-            glyphId = charCode;
+            glyphId = cid;
           } else if (cidToGidMap[cid] !== undefined) {
             glyphId = cidToGidMap[cid];
           }
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index dacec34f5..ae3506f34 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -68,6 +68,7 @@
 !devicen.pdf
 !cmykjpeg.pdf
 !issue840.pdf
+!issue4402_reduced.pdf
 !issue845r.pdf
 !issue3405r.pdf
 !issue3438.pdf
diff --git a/test/pdfs/issue4402_reduced.pdf b/test/pdfs/issue4402_reduced.pdf
new file mode 100644
index 000000000..bcccd3473
Binary files /dev/null and b/test/pdfs/issue4402_reduced.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index 72c5dbb3a..8d57d7ef9 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -911,6 +911,13 @@
        "rounds": 1,
        "type": "eq"
     },
+    {  "id": "issue4402_reduced",
+       "file": "pdfs/issue4402_reduced.pdf",
+       "md5": "6cc7e61a581889eec3ed7402d87161c4",
+       "link": false,
+       "rounds": 1,
+       "type": "eq"
+    },
     {  "id": "protectip",
        "file": "pdfs/protectip.pdf",
        "md5": "676e7a7b8f96d04825361832b1838a93",