Skip to content

Commit 7384359

Browse files
authored
Merge pull request #20781 from pengkunbin/fix/chinese-font-names-gbk
Fix missing Chinese font name variants (SimFang and XiaoBiaoSong) in GBK encoding detection
2 parents c41be4f + ead2a6e commit 7384359

5 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/core/evaluator.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,6 +3723,8 @@ class PartialEvaluator {
37233723
"\xB7\xC2\xCB\xCE_GB2312", // SimFang
37243724
"\xC1\xA5\xCA\xE9", // SimLi
37253725
"\xD0\xC2\xCB\xCE", // SimSun
3726+
"\xB7\xC2\xCB\xCE\xCC\xE5", // SimFang variant
3727+
"\xD0\xA1\xB1\xEA\xCB\xCE", // XiaoBiaoSong
37263728
];
37273729

37283730
// Check for common Chinese font names and their GBK-encoded equivalents

test/pdfs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
!bug1727053.pdf
1717
!issue18408_reduced.pdf
1818
!bug1907000_reduced.pdf
19+
!SimFang-variant.pdf
1920
!bug1953099.pdf
2021
!issue11913.pdf
2122
!issue2391-1.pdf
@@ -81,6 +82,7 @@
8182
!issue7835.pdf
8283
!issue11922_reduced.pdf
8384
!issue7855.pdf
85+
!XiaoBiaoSong.pdf
8486
!issue11144_reduced.pdf
8587
!issue7872.pdf
8688
!issue7901.pdf

test/pdfs/SimFang-variant.pdf

4.01 KB
Binary file not shown.

test/pdfs/XiaoBiaoSong.pdf

5.52 KB
Binary file not shown.

test/test_manifest.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13971,5 +13971,19 @@
1397113971
"md5": "ead167e0328f1a1f4f8901cee501a9c4",
1397213972
"rounds": 1,
1397313973
"type": "eq"
13974+
},
13975+
{
13976+
"id": "SimFang-variant",
13977+
"file": "pdfs/SimFang-variant.pdf",
13978+
"md5": "d412460812cd940917091e8975620faf",
13979+
"rounds": 1,
13980+
"type": "eq"
13981+
},
13982+
{
13983+
"id": "XiaoBiaoSong",
13984+
"file": "pdfs/XiaoBiaoSong.pdf",
13985+
"md5": "7072f6763bf2f0d6df14d5fc86962c5a",
13986+
"rounds": 1,
13987+
"type": "eq"
1397413988
}
1397513989
]

0 commit comments

Comments
 (0)