add save glyf command
This commit is contained in:
parent
beb760ff1c
commit
5671713e54
@ -46,6 +46,9 @@ define(
|
||||
else if (e.command == 'showgrid') {
|
||||
this.execCommand('showgrid', !e.args.selected);
|
||||
}
|
||||
else if (e.command == 'save') {
|
||||
this.fire('save');
|
||||
}
|
||||
else {
|
||||
this.execCommand(e.command, e);
|
||||
}
|
||||
@ -187,9 +190,7 @@ define(
|
||||
|
||||
// 保存
|
||||
if (e.keyCode == 83 && e.ctrlKey) {
|
||||
me.fire('save', {
|
||||
font: me.getFont()
|
||||
});
|
||||
me.fire('save');
|
||||
}
|
||||
// 粘贴
|
||||
else if (e.keyCode == 86 && e.ctrlKey) {
|
||||
|
@ -98,6 +98,10 @@ define(
|
||||
{
|
||||
name: 'fontsetting',
|
||||
title: '字形信息'
|
||||
},
|
||||
{
|
||||
name: 'save',
|
||||
title: '保存'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -336,8 +336,8 @@ define(
|
||||
program.on('save', function(e) {
|
||||
// 保存项目
|
||||
if (program.ttfManager.get()) {
|
||||
|
||||
if (program.editor.isEditing()) {
|
||||
var type = e.type;
|
||||
if (type === 'editor' || program.editor.isEditing()) {
|
||||
|
||||
// 如果是正在编辑的
|
||||
var editingIndex = program.viewer.getEditing();
|
||||
|
@ -70,6 +70,12 @@ define(
|
||||
});
|
||||
});
|
||||
|
||||
editor.on('save', function() {
|
||||
program.fire('save', {
|
||||
type: 'editor'
|
||||
});
|
||||
});
|
||||
|
||||
var commandMenu = this.commandMenu;
|
||||
if (commandMenu) {
|
||||
|
||||
@ -96,6 +102,13 @@ define(
|
||||
var args = e.args;
|
||||
var shapes;
|
||||
|
||||
if (command === 'save') {
|
||||
program.fire('save', {
|
||||
type: 'editor'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (command === 'splitshapes') {
|
||||
editor.setMode('split');
|
||||
return;
|
||||
|
@ -27,6 +27,11 @@ define(
|
||||
quickKey: 'D',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
name: 'save',
|
||||
title: '保存',
|
||||
quickKey: 'S'
|
||||
},
|
||||
{
|
||||
type: 'split'
|
||||
},
|
||||
|
@ -123,7 +123,7 @@ define(
|
||||
tableList.forEach(function(tableName) {
|
||||
var offset = ttfSize;
|
||||
var tableSize = new supportTables[tableName]().size(ttf); // 原始的表大小
|
||||
var size = tableSize; // 对对齐后的表大小
|
||||
var size = tableSize; // 对齐后的表大小
|
||||
|
||||
if (tableName == 'head') {
|
||||
ttfHeadOffset = offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user