From b45b205cf4d79089b45f2be8120cb15a1730f437 Mon Sep 17 00:00:00 2001 From: mkwiser Date: Tue, 21 Oct 2014 01:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0empty.woff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {src/fonteditor/data => font}/empty.json | 0 font/empty.woff | Bin 0 -> 1452 bytes src/fonteditor/data/online-font.js | 5 +++++ src/fonteditor/widget/actions.js | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) rename {src/fonteditor/data => font}/empty.json (100%) create mode 100644 font/empty.woff diff --git a/src/fonteditor/data/empty.json b/font/empty.json similarity index 100% rename from src/fonteditor/data/empty.json rename to font/empty.json diff --git a/font/empty.woff b/font/empty.woff new file mode 100644 index 0000000000000000000000000000000000000000..10746fb19d23ffae5f88aca0ada1adfc98aed6ff GIT binary patch literal 1452 zcmd^9&ubGw6#iy6skT;ZX%0mSj;q)fx^c5jfA=Do6c4qc5JvCsHgss=5!=s#KaJqCi*|)vLnsMjU>Mxv7;{trVb^VN% zr^oL9$pjn^`%Mq`gmzNMFxSFZw7v;TnpsX zwv${+PfNQZ7o}a7bB?svr0Y<$WGXG~9cisu()Og?=;eb4A2kFhqJT1`k2=;Pt%)id z5&AQK`6W_F!hysxxnG9RGY^}Q4p*0JiXU3P*c?x*qrubFNxj@F!~q`) zC4XJp%$URyb52vYQQ^9%QJw3YuFl39u{vATYNN$fRiW?>SBrj2Yo1;kee2^iMbp)J Kz-0YM0KWl{)2^Wa literal 0 HcmV?d00001 diff --git a/src/fonteditor/data/online-font.js b/src/fonteditor/data/online-font.js index 83e800e..ec2c760 100644 --- a/src/fonteditor/data/online-font.js +++ b/src/fonteditor/data/online-font.js @@ -14,6 +14,11 @@ define( name: 'iconfont.ttf', url: './font/iconfont.ttf', from: '阿里妈妈图标库' + }, + { + name: 'empty.woff', + url: './font/empty.woff', + from: 'fonteditor' } ]; } diff --git a/src/fonteditor/widget/actions.js b/src/fonteditor/widget/actions.js index 1a409ea..5687823 100644 --- a/src/fonteditor/widget/actions.js +++ b/src/fonteditor/widget/actions.js @@ -21,7 +21,7 @@ define( if (program.ttfManager.isChanged() && !window.confirm('是否放弃保存当前项目?')) { return; } - $.getJSON('./src/fonteditor/data/empty.json', function(imported) { + $.getJSON('./font/empty.json', function(imported) { program.ttfManager.set(imported); program.data.projectName = null; }); @@ -93,7 +93,7 @@ define( url: url, onSuccess: function(buffer) { program.loader.load(buffer, { - type: 'ttf', + type: url.slice(url.lastIndexOf('.') + 1) || 'ttf', success: function(imported) { program.loading.hide(); if (program.ttfManager.get()) {