From fe55204042b7225671e57cc78f06fdd7f58cacf5 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 28 Jun 2011 13:15:00 +0200 Subject: [PATCH] Add 1 to the number of metrics in the HHEA table and remove the mapping of .notdef --- fonts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fonts.js b/fonts.js index 847f5292e..37b8dbcce 100644 --- a/fonts.js +++ b/fonts.js @@ -271,7 +271,6 @@ var Font = (function () { }; function createCMapTable(glyphs) { - glyphs.push({unicode: 0x000}); var ranges = getRanges(glyphs); var headerSize = (12 * 2 + (ranges.length * 4 * 2)); @@ -305,7 +304,7 @@ var Font = (function () { var range = ranges[i]; var start = range[0]; var end = range[1]; - var delta = (((start - 1) - bias) ^ 0xffff); + var delta = (((start - 1) - bias) ^ 0xffff) + 1; bias += (end - start + 1); startCount += string16(start); @@ -721,7 +720,7 @@ var Font = (function () { "\x00\x00" + // -reserved- "\x00\x00" + // -reserved- "\x00\x00" + // metricDataFormat - string16(charstrings.length) + string16(charstrings.length + 1) // Number of HMetrics ); createTableEntry(otf, offsets, "hhea", hhea);