[Pkg-javascript-commits] [pdf.js] 23/119: Don't map glyphs to Unicode position 0x0E33, i.e. Thai character SARA AM (bug1046314)

David Prévot taffit at moszumanska.debian.org
Wed May 13 21:27:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 2b1a13ba28580ecb1e8b9cbe192ddeff01df14a3
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Mar 26 12:40:37 2015 +0100

    Don't map glyphs to Unicode position 0x0E33, i.e. Thai character SARA AM (bug1046314)
    
    *A similar approach as in PR 5705.*
    
    Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1046314.
    
    According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-complex-thai.cc#270-365, `0x0E33` is treated as a special case (by the font shaping code in Firefox). Hence it seems reasonable to skip it when adjusting the font mapping.
---
 src/core/fonts.js        |   1 +
 test/pdfs/.gitignore     |   1 +
 test/pdfs/bug1046314.pdf | Bin 0 -> 39249 bytes
 test/test_manifest.json  |   7 +++++++
 4 files changed, 9 insertions(+)

diff --git a/src/core/fonts.js b/src/core/fonts.js
index ab32621..a2efa65 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -2698,6 +2698,7 @@ var Font = (function FontClosure() {
            fontCharCode === 0x7F || // Control char
            fontCharCode === 0xAD || // Soft hyphen
            fontCharCode === 0xA0 || // Non breaking space
+           fontCharCode === 0x0E33 || // Thai character SARA AM 
            fontCharCode === 0x25CC || // Dotted circle (combining mark)
            (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
            // Prevent drawing characters in the specials unicode block.
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 6d4c736..a744db6 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -86,6 +86,7 @@
 !bug866395.pdf
 !bug1027533.pdf
 !bug1028735.pdf
+!bug1046314.pdf
 !bug1065245.pdf
 !basicapi.pdf
 !mixedfonts.pdf
diff --git a/test/pdfs/bug1046314.pdf b/test/pdfs/bug1046314.pdf
new file mode 100644
index 0000000..8f69fc8
Binary files /dev/null and b/test/pdfs/bug1046314.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index d6bc052..4ddf669 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -557,6 +557,13 @@
        "rounds": 1,
        "type": "load"
     },
+    {  "id": "bug1046314",
+       "file": "pdfs/bug1046314.pdf",
+       "md5": "fc658439f44cd2dd27c8bee7e7a8344e",
+       "rounds": 1,
+       "link": false,
+       "type": "eq"
+    },
     {  "id": "hudsonsurvey",
        "file": "pdfs/hudsonsurvey.pdf",
        "md5": "bf0e6576a7b6c2fe7485bce1b78e006f",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list