mozilla/pdf.js — pull request #4259 by brendandahl (2014-02-07 00:54:00+00:00)
Title: Adds built in CMaps and unifies much the glyph mapping.

Changes
- Use adobe provided CMaps instead of relying on text decoder.
- Attempts to follow section 9.6.6 (text encoding) as much as possible for mapping glyphs.
- Builds a unicode map based of 9.10 which is then used adjust the cmap we build.
- All cmap building goes through one function now.
- All fonts build a toFontChar so charToGlyphs doesn't have multiple paths.
- Tries to standardize on names of various common things:
- fontCharCode - the character code that will be in the final font e.g. what we use in canvasCtx.fillText
- charCode - the character code that comes from the pdf e.g. what is in a pdf show text command
- glyphId - the glyph index
- cmap - true type cmap
- cMap - character map

Expected Failures:
thuluthfont-pdf - minor - junk changes to different junk
issue919 - minor - change, some glyphs now don't end up in private use area
issue1912 - minor - movement not sure why, some glyphs are now mapped to correct unicode location
issue3405 - good - notdef shows in acrobat and preview
mao.pdf - good - looks more like acrobat
p020121130574743273239 - good - looks more like acrobat

Fixes:
#2884
#3323
#4061
#3120 - though this also seem to be fixed from a FF patch, but fixed in Aurora too
#2931
#2882
#1691