Browse Source

Merge pull request #2254 from yurydelendik/no-glyphs

Fixes font processing when no glyphs are found
Brendan Dahl 13 years ago
parent
commit
8c3fdd069a
  1. 6
      src/fonts.js

6
src/fonts.js

@ -3557,6 +3557,12 @@ var Font = (function FontClosure() {
this.glyphNameMap = properties.glyphNameMap; this.glyphNameMap = properties.glyphNameMap;
} }
if (glyphs.length === 0) {
// defines at least one glyph
glyphs.push({ unicode: 0xF000, code: 0xF000, glyph: '.notdef' });
ids.push(0);
}
// Converting glyphs and ids into font's cmap table // Converting glyphs and ids into font's cmap table
cmap.data = createCMapTable(glyphs, ids); cmap.data = createCMapTable(glyphs, ids);
var unicodeIsEnabled = []; var unicodeIsEnabled = [];

Loading…
Cancel
Save