Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
*This patch depends on PR 5990.* According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#38, certain Thai/Lao characters are treated as special by the font shaping code in Firefox. Further down in that file, https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#216, the vertical position of glyphs is modified, which should thus explain why some glyphs end up in the wrong position in the PDF file. Fixes 5994.
This commit is contained in:
parent
749a60a0b7
commit
6f2f0700b7
@ -2697,12 +2697,14 @@ var Font = (function FontClosure() {
|
||||
case 0x7F: // Control char
|
||||
case 0xA0: // Non breaking space
|
||||
case 0xAD: // Soft hyphen
|
||||
case 0x0E33: // Thai character SARA AM
|
||||
case 0x2011: // Non breaking hyphen
|
||||
case 0x205F: // Medium mathematical space
|
||||
case 0x25CC: // Dotted circle (combining mark)
|
||||
return true;
|
||||
}
|
||||
if ((code & ~0xFF) === 0x0E00) { // Thai/Lao chars (with combining mark)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -56,6 +56,7 @@
|
||||
!issue5734.pdf
|
||||
!issue4875.pdf
|
||||
!issue4881.pdf
|
||||
!issue5994.pdf
|
||||
!rotated.pdf
|
||||
!issue1249.pdf
|
||||
!issue1171.pdf
|
||||
|
19600
test/pdfs/issue5994.pdf
Normal file
19600
test/pdfs/issue5994.pdf
Normal file
File diff suppressed because one or more lines are too long
@ -1081,6 +1081,13 @@
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue5994",
|
||||
"file": "pdfs/issue5994.pdf",
|
||||
"md5": "6799733a39d29b3828d6628bf2c5c382",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "zerowidthline",
|
||||
"file": "pdfs/zerowidthline.pdf",
|
||||
"md5": "295d26e61a85635433f8e4b768953f60",
|
||||
|
Loading…
Reference in New Issue
Block a user