Fixes non-Japanese characters spacing
This commit is contained in:
parent
a0313bef22
commit
0df411a3da
12
src/fonts.js
12
src/fonts.js
@ -4171,12 +4171,16 @@ var Font = (function FontClosure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cidEncoding = properties.cidEncoding;
|
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.
|
// 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 = [];
|
this.cidToUnicode = [];
|
||||||
|
} else {
|
||||||
|
// We don't have to do reverse conversions if the string is
|
||||||
|
// already CID.
|
||||||
|
this.unicodeToCID = [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -40,6 +40,7 @@
|
|||||||
!mixedfonts.pdf
|
!mixedfonts.pdf
|
||||||
!shading_extend.pdf
|
!shading_extend.pdf
|
||||||
!noembed-identity.pdf
|
!noembed-identity.pdf
|
||||||
|
!noembed-identity-2.pdf
|
||||||
!noembed-jis7.pdf
|
!noembed-jis7.pdf
|
||||||
!noembed-eucjp.pdf
|
!noembed-eucjp.pdf
|
||||||
!noembed-sjis.pdf
|
!noembed-sjis.pdf
|
||||||
|
BIN
test/pdfs/noembed-identity-2.pdf
Normal file
BIN
test/pdfs/noembed-identity-2.pdf
Normal file
Binary file not shown.
@ -823,6 +823,12 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "noembed-identity-2",
|
||||||
|
"file": "pdfs/noembed-identity-2.pdf",
|
||||||
|
"md5": "5549571a910814a9c53a1761b27fd028",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "noembed-jis7",
|
{ "id": "noembed-jis7",
|
||||||
"file": "pdfs/noembed-jis7.pdf",
|
"file": "pdfs/noembed-jis7.pdf",
|
||||||
"md5": "a0f6cf5a830f23d0c35994a6aaf92b3d",
|
"md5": "a0f6cf5a830f23d0c35994a6aaf92b3d",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user