From 4e242880b66c2266ea81ffd254e4b0d0e743c8a0 Mon Sep 17 00:00:00 2001 From: Adil Allawi Date: Tue, 28 Jun 2011 15:14:38 +0100 Subject: [PATCH] Function replaceCMapTable() was not setting the font pos pointer to the correct place to read the cmap. Caused Mac PDFs to fail because the cmap was not correctly rewritten. --- fonts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/fonts.js b/fonts.js index 728bc5c68..99d6dd218 100644 --- a/fonts.js +++ b/fonts.js @@ -425,6 +425,7 @@ var Font = (function () { }; function replaceCMapTable(cmap, font, properties) { + font.pos = cmap.length; var version = FontsUtils.bytesToInteger(font.getBytes(2)); var numTables = FontsUtils.bytesToInteger(font.getBytes(2));