From 1037fdf2ada515ee46c6f63fe4e9d8f7a4df0a28 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Mon, 4 Jul 2011 04:39:58 +0200 Subject: [PATCH] Fix a small issue with the 'name' table --- fonts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fonts.js b/fonts.js index 8bee706b2..dceda2cdd 100644 --- a/fonts.js +++ b/fonts.js @@ -988,7 +988,7 @@ var Font = (function Font() { var nameTable = "\x00\x00" + // format string16(namesRecordCount) + // Number of names Record - string16(namesRecordCount * 12 + 6); // Storage + string16(namesRecordCount * 12 + 6); // Offset to start of storage // Build the name records field var strOffset = 0; @@ -1000,7 +1000,7 @@ var Font = (function Font() { platforms[i] + // platform ID encodings[i] + // encoding ID languages[i] + // language ID - string16(i) + // name ID + string16(j) + // name ID string16(str.length) + string16(strOffset); nameTable += nameRecord; @@ -1008,9 +1008,9 @@ var Font = (function Font() { } } - nameTable += strings.join("") + stringsUnicode.join(""); + nameTable += strings.join("") + stringsUnicode.join(""); return nameTable; - } + }; function isFixedPitch(glyphs) { for (var i = 0; i < glyphs.length - 1; i++) {