1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Make CMap.map quasi-private.

This makes it easier for the representation to be improved.
This commit is contained in:
Nicholas Nethercote 2014-07-29 20:30:16 -07:00
parent 1e52c770d9
commit b86daed29d
3 changed files with 44 additions and 30 deletions

View file

@ -1309,10 +1309,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var cmapObj = toUnicode;
if (isName(cmapObj)) {
return CMapFactory.create(cmapObj,
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).map;
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap();
} else if (isStream(cmapObj)) {
var cmap = CMapFactory.create(cmapObj,
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).map;
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap();
// Convert UTF-16BE
// NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
// to iterate over all keys.