Skip to content

Commit

Permalink
Don't map glyphs to the Lepcha Unicode block (issue 7426)
Browse files Browse the repository at this point in the history
In the PDF file in the issue, some of the glyphs end up being mapped to the Lepcha Unicode block; see https://en.wikipedia.org/wiki/Lepcha_(Unicode_block).
This didn't use to matter, but after HarfBuzz updates that improved support for Lepcha fonts, in particular https://bugzilla.mozilla.org/show_bug.cgi?id=1249861, some glyphs are now moved horizontally.
To avoid that, this patch adds the Lepcha block to the list of Unicode ranges that we skip when building the glyph mapping.

Fixes 7426.
  • Loading branch information
Snuffleupagus committed Jul 17, 2016
1 parent 11381cd commit 64783c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ var ProblematicCharRanges = new Int32Array([
0x0600, 0x0780,
0x08A0, 0x10A0,
0x1780, 0x1800,
0x1C00, 0x1C50,
// General punctuation chars.
0x2000, 0x2010,
0x2011, 0x2012,
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!issue7180.pdf
!issue7200.pdf
!issue7229.pdf
!issue7426.pdf
!issue7439.pdf
!filled-background.pdf
!ArabicCIDTrueType.pdf
Expand Down
Binary file added test/pdfs/issue7426.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,13 @@
"link": false,
"type": "eq"
},
{ "id": "issue7426",
"file": "pdfs/issue7426.pdf",
"md5": "304e6cae18fdc07f66bd621fbe16b6cb",
"link": false,
"rounds": 1,
"type": "eq"
},
{ "id": "issue6782",
"file": "pdfs/issue6782.pdf",
"md5": "b423f709600daa5745cc6d8234f7c608",
Expand Down

0 comments on commit 64783c8

Please sign in to comment.