forked from ecomfe/fonteditor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
162 lines (137 loc) · 7.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FontEditor字体编辑器</title>
<link rel="stylesheet" type="text/css" href="./dep/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./css/main.css">
</head>
<body>
<section class="navbar" role="navigation">
<div class="logo"></div>
<div class="action-groups btn-groups">
<button data-action="add-new" type="button" class="btn btn-flat btn-new btn-sm"><i class="ico ico-left i-add"></i>新字形</button>
<i class="split"></i>
<button data-action="undo" type="button" class="btn btn-flat btn-ico" title="撤销"><i class="ico i-undo"></i></button>
<button data-action="redo" type="button" class="btn btn-flat btn-ico" title="重做"><i class="ico i-redo"></i></button>
<i class="split"></i>
<div class="btn-group">
<button type="button" class="btn btn-flat btn-sm dropdown-toggle" data-toggle="dropdown">
导入
<span class="ico i-down"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li data-action="import" title="导入svg格式字体文件"><a>导入svg</a></li>
<li data-action="import-pic" title="导入图片"><a>导入图片</a></li>
<li data-action="import" title="导入ttf,woff,eot格式字体文件"><a>导入字体文件</a></li>
<li data-action="add-online"><a>在线字体</a></li>
<li data-action="add-url"><a>字体URL</a></li>
</ul>
</div>
<i class="split"></i>
<a id="export-btn" href="#" data-action="export" data-type="ttf" class="btn btn-flat btn-ico" title="导出ttf"><i class="ico i-ttf"></i></a>
<a id="export-btn-woff" href="#" data-action="export" data-type="woff" class="btn btn-flat btn-ico" title="导出woff"><i class="ico i-woff"></i></a>
<a id="export-btn-zip" href="#" data-action="export" data-type="zip" class="btn btn-flat btn-ico" title="导出zip,包含ttf,woff,eot,svg等格式字体和icon示例"><i class="ico i-zip"></i></a>
<i class="split"></i>
<button data-action="save" type="button" class="btn btn-flat btn-sm"><i class="ico ico-left i-save"></i>保存项目</button>
<div class="btn-group">
<button type="button" class="btn btn-flat btn-sm dropdown-toggle" data-toggle="dropdown">
设置
<span class="drop ico i-down"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a data-action="setting-name">字体信息</a></li>
<li><a data-action="setting-metrics">字体度量</a></li>
<li><a data-action="setting-glyf-name">生成字形名称</a></li>
<li><a data-action="setting-glyf-clearname">清除字形名称</a></li>
<li><a data-action="setting-editor">编辑器</a></li>
<li><a data-action="setting-import-and-export">导入和导出</a></li>
</ul>
</div>
<i class="split"></i>
<div class="btn-group">
<button type="button" class="btn btn-flat btn-preview btn-sm dropdown-toggle" data-toggle="dropdown">
预览
<span class="drop ico i-down"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a data-format="ttf" data-action="preview">ttf字体</a></li>
<li><a data-format="woff" data-action="preview">woff字体</a></li>
<li><a data-format="svg" data-action="preview" title="仅支持Safari">svg字体(仅safari)</a></li>
<li><a data-format="eot" data-action="preview" title="仅支持IE">eot字体(仅IE)</a></li>
</ul>
</div>
</div>
<a class="ico i-github forkme" href="https://github.com/ecomfe/fonteditor" target="_blank">Fork me on Github</a>
<a class="ico i-help userguide" href="./doc/index.html" target="_blank">帮助</a>
</section>
<section class="sidebar">
<div class="project-btns action-groups">
<button data-action="new" type="button" class="btn btn-flat btn-sm" title="新建ttf字体文件"><i class="ico ico-left i-new"></i>新建</button><button data-action="open" type="button" class="btn btn-flat btn-sm" title="打开ttf,woff,eot格式字体文件"><i class="ico ico-left i-open"></i>打开</button>
</div>
<div class="project">
<div class="project-title">项目列表</div>
<div id="project-list" class="project-list"></div>
</div>
</section>
<section class="main">
<ul id="glyf-list-commandmenu" class="command-groups"></ul>
<div id="glyf-list-pager" class="pager"></div>
<div id="glyf-list" class="glyf-list"></div>
</section>
<section class="editor">
<ul id="editor-commandmenu" class="command-groups"></ul>
<i class="ico i-leave close-editor" title="点击或者按'F2'键关闭编辑器"></i>
<div id="glyf-editor" class="glyf-editor" oncontextMenu="return false"></div>
</section>
<div id="selection-range" class="selection-range"></div>
<div id="loading" class="loading"><span>正在加载...</span></div>
<!-- Modal -->
<div class="modal" id="model-dialog" tabindex="-1" role="dialog" aria-labelledby="model-label" aria-hidden="true" data-backdrop="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
<h4 class="modal-title" id="model-label">设置</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-sm" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-flat btn-sm btn-confirm">确定</button>
</div>
</div>
</div>
</div>
<form id="font-form" style="width:0px;height:0px;overflow:hidden;"><input id="font-import" type="file" multiple="multiple"></form>
<iframe id="sync-frame" name="sync-frame" width="0" height="0" frameborder="0" style="display:none;"></iframe>
<script src="./dep/esl.js"></script>
<script src="./dep/jquery.min.js"></script>
<script src="./dep/bootstrap/js/bootstrap.min.js"></script>
<script src="./dep/clipper.js"></script>
<script src="./dep/hidpi-canvas.js"></script>
<script>
require.config({
baseUrl: './src',
paths: {
text: '../dep/requirejs-text',
utpl: '../dep/utpl.min',
JSZip: '../dep/jszip/jszip.min',
inflate: '../dep/pako_inflate.min',
deflate: '../dep/pako_deflate.min'
}
});
define('jquery', window.jQuery);
define('ClipperLib', window.ClipperLib);
require(['fonteditor/main'])
</script>
<script>
var _hmt = _hmt || [];
/baidu.com$/.test(location.hostname) && (function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65ce30cdeda584c416e39648915689f7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>