mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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
4 changed files with 19611 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue