Skip to content

Commit

Permalink
fixed font generation bug
Browse files Browse the repository at this point in the history
the bug triggered if source font has units-per-em other than 1000.
  • Loading branch information
shmelev committed Mar 6, 2012
1 parent dcdde19 commit c807af7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/js/views/generatedfont.js
Expand Up @@ -78,6 +78,7 @@ var fm = (function (fm) {

// update font's textarea
updateFont: function () {
var self = this;
if (!App.main.xml_template)
return;

Expand All @@ -101,7 +102,7 @@ var fm = (function (fm) {
var scale = cfg.output.units_per_em
/ font.units_per_em;
if (glyph.d)
glyph.d = this.scalePath(glyph.d, scale);
glyph.d = self.scalePath(glyph.d, scale);
if (glyph.horiz_adv_x)
glyph.horiz_adv_x *= scale;
}
Expand Down

0 comments on commit c807af7

Please sign in to comment.