return {
tag: tag,
checksum: checksum,
- length: offset,
- offset: length,
+ length: length,
+ offset: offset,
data: data
};
};
};
function replaceCMapTable(cmap, font, properties) {
- var start = (font.start ? font.start : 0) + cmap.length;
+ var start = (font.start ? font.start : 0) + cmap.offset;
font.pos = start;
var version = int16(font.getBytes(2));
// PDF did not contain a GIDMap for the font so create an identity cmap
// First get the number of glyphs from the maxp table
- font.pos = (font.start ? font.start : 0) + maxp.length;
+ font.pos = (font.start ? font.start : 0) + maxp.offset;
var version = int16(font.getBytes(4));
var numGlyphs = int16(font.getBytes(2));