Browse Source

Merge pull request #2597 from vyv03354/master

Fixes non-Japanese characters spacing
Yury Delendik 12 years ago
parent
commit
42c00b09bc
  1. 12
      src/fonts.js
  2. 1
      test/pdfs/.gitignore
  3. BIN
      test/pdfs/noembed-identity-2.pdf
  4. 6
      test/test_manifest.json

12
src/fonts.js

@ -4171,12 +4171,16 @@ var Font = (function FontClosure() { @@ -4171,12 +4171,16 @@ var Font = (function FontClosure() {
}
var cidEncoding = properties.cidEncoding;
if (cidEncoding && cidEncoding.indexOf('Identity-') !== 0) {
if (!cidEncoding) {
return;
}
if (cidEncoding.indexOf('Identity-') !== 0) {
// input is already Unicode for non-Identity CMap encodings.
// However, Unicode-to-CID conversion is needed
// regardless of the CMap encoding. So we can't reset
// unicodeToCID.
this.cidToUnicode = [];
} else {
// We don't have to do reverse conversions if the string is
// already CID.
this.unicodeToCID = [];
}
},

1
test/pdfs/.gitignore vendored

@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
!mixedfonts.pdf
!shading_extend.pdf
!noembed-identity.pdf
!noembed-identity-2.pdf
!noembed-jis7.pdf
!noembed-eucjp.pdf
!noembed-sjis.pdf

BIN
test/pdfs/noembed-identity-2.pdf

Binary file not shown.

6
test/test_manifest.json

@ -823,6 +823,12 @@ @@ -823,6 +823,12 @@
"rounds": 1,
"type": "eq"
},
{ "id": "noembed-identity-2",
"file": "pdfs/noembed-identity-2.pdf",
"md5": "5549571a910814a9c53a1761b27fd028",
"rounds": 1,
"type": "eq"
},
{ "id": "noembed-jis7",
"file": "pdfs/noembed-jis7.pdf",
"md5": "a0f6cf5a830f23d0c35994a6aaf92b3d",

Loading…
Cancel
Save