1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #5111 from nnethercote/better-cidchars

Represent cid chars using integers, not strings.
This commit is contained in:
Yury Delendik 2014-08-04 22:26:55 -05:00
commit 6865c284a7
3 changed files with 46 additions and 37 deletions

View file

@ -44,7 +44,7 @@ describe('cmap', function() {
'endcidchar\n';
var stream = new StringStream(str);
var cmap = CMapFactory.create(stream);
expect(cmap.lookup(0x14)).toEqual(String.fromCharCode(0x00));
expect(cmap.lookup(0x14)).toEqual(0x00);
expect(cmap.lookup(0x15)).toBeUndefined();
});
it('parses begincidrange', function() {
@ -54,8 +54,8 @@ describe('cmap', function() {
var stream = new StringStream(str);
var cmap = CMapFactory.create(stream);
expect(cmap.lookup(0x15)).toBeUndefined();
expect(cmap.lookup(0x16)).toEqual(String.fromCharCode(0x00));
expect(cmap.lookup(0x1B)).toEqual(String.fromCharCode(0x05));
expect(cmap.lookup(0x16)).toEqual(0x00);
expect(cmap.lookup(0x1B)).toEqual(0x05);
expect(cmap.lookup(0x1C)).toBeUndefined();
});
it('decodes codespace ranges', function() {