Skip to content

Commit

Permalink
modify descent render
Browse files Browse the repository at this point in the history
  • Loading branch information
kekee000 committed Apr 13, 2016
1 parent 9c72fb5 commit ab38a19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/fonteditor/widget/glyfviewer/GLYFViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define(

function showGLYF(ttf) {
var unitsPerEm = ttf.head.unitsPerEm;
var descent = unitsPerEm + ttf.hhea.descent;
var descent = ttf.hhea.descent;
var selectedHash = {};
var selectedList = this.selectedList || [];
selectedList.forEach(function (i) {
Expand Down Expand Up @@ -48,7 +48,7 @@ define(

function refreshGLYF(ttf, refreshList) {
var unitsPerEm = ttf.head.unitsPerEm;
var descent = unitsPerEm + ttf.hhea.descent;
var descent = ttf.hhea.descent;
var selectedHash = {};
var selectedList = this.selectedList || [];

Expand Down
4 changes: 2 additions & 2 deletions src/fonteditor/widget/glyfviewer/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define(
+ '<i data-action="edit" class="ico i-edit" title="' + i18n.lang.edit + '"></i>'
+ '<i data-action="del" class="ico i-del" title="' + i18n.lang.del + '"></i>'
+ '<svg class="glyf" viewbox="0 0 ${unitsPerEm} ${unitsPerEm}">'
+ '<g transform="scale(1, -1) translate(0, -${descent}) scale(0.95, 0.95) ">'
+ '<g transform="scale(1, -1) translate(0, -${translateY}) scale(0.95, 0.95) ">'
+ '<path class="path" ${fillColor} ${d}/></g>'
+ '</svg>'
+ '<div data-field="unicode" class="unicode" title="${unicode}">${unicode}</div>'
Expand All @@ -41,7 +41,7 @@ define(
editing: opt.editing ? 'editing' : '',
modify: glyf.modify,
unitsPerEm: opt.unitsPerEm,
descent: opt.descent,
translateY: opt.unitsPerEm + opt.descent,
unicode: (glyf.unicode || []).map(function (u) {
return '$' + u.toString(16).toUpperCase();
}).join(','),
Expand Down

0 comments on commit ab38a19

Please sign in to comment.