From 9921288f44292ce6a9bf1c5be6f39c6f4f489176 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Thu, 30 Jun 2011 03:24:07 +0200 Subject: [PATCH] Set a default font size identical for .notdef --- fonts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fonts.js b/fonts.js index 1aee442c6..a3f270c94 100644 --- a/fonts.js +++ b/fonts.js @@ -299,6 +299,7 @@ var Font = (function () { // Wrap the CFF data inside an OTF font file data = this.convert(name, cff, properties); + writeToFile(data, "/tmp/file." + fontName + "-" + fontCount + ".otf"); break; case "TrueType": @@ -922,7 +923,7 @@ var Font = (function () { * while Windows use this data. So be careful if you hack on Linux and * have to touch the 'hmtx' table */ - hmtx = "\x00\x00\x00\x00"; // Fake .notdef + hmtx = "\x00\x8B\x00\x00"; // Fake .notdef var width = 0, lsb = 0; for (var i = 0; i < charstrings.length; i++) { var charstring = charstrings[i]; @@ -1635,7 +1636,7 @@ CFF.prototype = { charset.push(bytes[1]); } - var charstringsIndex = this.createCFFIndexHeader([[0x40, 0x0E]].concat(glyphs), true); + var charstringsIndex = this.createCFFIndexHeader([[0x8B, 0x0E]].concat(glyphs), true); //Top Dict Index var topDictIndex = [