-
Notifications
You must be signed in to change notification settings - Fork 16
Description
When I try add some glyphs into a font after updateOTCommand. New glyphs are not apply to new font. I use safari 9.0 on Mac OS. My script as following:
(function(p) {
var font = new p.Font({
familyName: 'Demo',
ascender: 800,
descender: -100
}),
a = new p.Glyph({
name: 'a',
unicode: 'a',
advanceWidth: 496
}),
i = new p.Glyph({
name: 'i',
unicode: 'i',
advanceWidth: 268
}),
shape;
// a contour
shape = new p.Path.RegularPolygon({
center: [268, 124],
sides: 3,
radius: 248
});
shape.rotate(180, [268, 124]);
shape.scale(1, 1.4, [268, 0]);
a.addContour(shape);
// i contour
shape = new p.Path.Rectangle({
point: [60, 0],
size: [140, 500]
});
i.addContour(shape);
font.addGlyph(a);
font.updateOTCommands().addToFonts(); // It's OK.
font.addGlyph(i);
font.updateOTCommands().addToFonts(); // It's not OK. The font did not show glyph "i".
})(plumin.paper);