mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Refactors CMapFactory.create to make it async
This commit is contained in:
parent
c6d2b7f9d9
commit
f6d28ca323
8 changed files with 559 additions and 473 deletions
|
@ -6,17 +6,20 @@ describe('font_fpgm', function() {
|
|||
it('table was truncated in the middle of functions', function() {
|
||||
var output;
|
||||
waitsFor(function() { return output; }, 10000);
|
||||
var font = new Font("font", new Stream(font2324), {
|
||||
loadedName: 'font',
|
||||
type: 'CIDFontType2',
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap: CMapFactory.create(new Name('Identity-H'))
|
||||
});
|
||||
ttx(font.data, function(result) { output = result; });
|
||||
runs(function() {
|
||||
verifyTtxOutput(output);
|
||||
expect(/(ENDF\[ \]|SVTCA\[0\])\s*<\/assembly>\s*<\/fpgm>/.test(output)).toEqual(true);
|
||||
CMapFactory.create(new Name('Identity-H')).then(function (cMap) {
|
||||
var font = new Font("font", new Stream(font2324), {
|
||||
loadedName: 'font',
|
||||
type: 'CIDFontType2',
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap: cMap,
|
||||
toUnicode: new ToUnicodeMap([])
|
||||
});
|
||||
ttx(font.data, function(result) { output = result; });
|
||||
runs(function() {
|
||||
verifyTtxOutput(output);
|
||||
expect(/(ENDF\[ \]|SVTCA\[0\])\s*<\/assembly>\s*<\/fpgm>/.test(output)).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue