-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
219 lines (213 loc) · 8.37 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fontmin - 字体子集化方案</title>
<meta name="keywords" content="字体, font, typeface, 子集, JavaScript, webfont">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="bookmark" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="src/css/app.css">
<script>
(function(supports) {
var language = (navigator.language || navigator.browserLanguage).toLowerCase();
var lang = language.substr(0, 2);
if (lang === 'zh') {
lang = language.substr(-2);
}
var jump = supports[lang];
if (jump) {
location.href = jump;
}
}({
'en': 'en',
'ja': 'jp',
'kr': 'kr',
'tw': 'tw'
}));
</script>
<script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/2-0-4/esl.js"></script>
<script>
require.config({
'baseUrl': 'src',
'paths': {
'jquery': '../dep/jquery/dist/jquery.min',
'lettering': '../dep/Lettering.js/jquery.lettering',
'fullpage': '../dep/fullpage/jquery.fullPage.min'
},
'shim': {
'lettering': ['jquery'],
'fullpage': ['jquery']
},
'packages': []
});
</script>
</head>
<body>
<!--[if lt IE 8]>
<div style="width:100%;height:100%;z-index:99999;">
<p style="text-align:center;font-size:3em;line-height:1.5;margin:5em 0">您正在用 <strong style="color:#DB043D">过时的</strong> 浏览器,请 <a style="color:#538BF2" href="http://browsehappy.com/">升级您的浏览器</a></p>
<p style="text-align:center;font-size:6em;line-height:2">
╮( ̄▽ ̄)╭
</p>
</div>
<![endif]-->
<div id="loading">
<div class="load-left"></div>
<div class="load-right"></div>
<div class="load-spinner">
<img src="src/img/logo.png" width="256" height="256" alt="loading">
<h1>Fontmin</h1>
</div>
</div>
<div id="fullpage">
<div class="section banner">
<img class="logo" src="src/img/logo.png" alt="logo">
<h1>Fontmin</h1>
<h2>第一个纯 JavaScript 字体子集化方案</h2>
<div class="menu">
<a href="#feature">特性</a>
<a href="#usage">使用</a>
<a href="#terminal">终端</a>
<a href="#app">应用</a>
<a href="#source">源码</a>
</div>
</div>
<div class="section feature">
<div class="section-title">
<div class="bg"></div>
<h1>特性</h1>
</div>
<div class="feature-left">
<div class="font-body">
<div class="font-chars">
<p>道可道,非常道。名可名,非常名。</p>
</div>
<p class="font-info">
<span class="font-name">新蒂文征明体</span>
<span class="font-meta">字型: 7500+</span>
</p>
<div class="tags">
<img data-src="https://img.shields.io/badge/TTF-4.2MB-yellow.svg?style=flat-square" alt="TTF: 4.2MB">
</div>
</div>
</div>
<div class="feature-right">
<div class="font-body">
<div class="font-chars">
<p>道可,非常。名</p>
</div>
<p class="font-info">
<span class="font-name">新蒂文征明体</span>
<span class="font-meta">字型: 7个</span>
</p>
<div class="tags">
<img data-src="https://img.shields.io/badge/TTF-4.5KB-yellow.svg?style=flat-square" alt="TTF: 4.5KB">
<img data-src="https://img.shields.io/badge/EOT-4.8KB-yellow.svg?style=flat-square" alt="EOT: 4.8KB">
<img data-src="https://img.shields.io/badge/SVG-9.9KB-yellow.svg?style=flat-square" alt="SVG: 9.9KB">
<img data-src="https://img.shields.io/badge/WOFF-3.3KB-yellow.svg?style=flat-square" alt="WOFF: 3.3KB">
<img data-src="https://img.shields.io/badge/CSS-Snippet-blue.svg?style=flat-square" alt="CSS: Snippet">
</div>
</div>
</div>
<div class="arrow">
<i></i>
<em></em>
</div>
<div class="feature-more">
大道三千, 各取其一, 须弥芥子, 无所增减
</div>
</div>
<div class="section usage">
<div class="section-title">
<div class="bg"></div>
<h1>使用</h1>
</div>
<pre>
var Fontmin = require('fontmin');
var fontmin = new Fontmin()
.src('fonts/*.ttf')
.dest('build/fonts');
fontmin.run(function (err, files) {
if (err) {
throw err;
}
console.log(files[0]);
// => { contents: <Buffer 00 01 00 ...> }
});
</pre>
<p class="links">
Doc:
<a target="_blank" href="https://github.com/ecomfe/fontmin#api">API</a> /
<a target="_blank" href="https://github.com/ecomfe/fontmin#plugins">Plugins</a>
</p>
</div>
<div class="section terminal">
<div class="section-title">
<div class="bg"></div>
<h1>终端</h1>
</div>
<img src="src/img/terminal.png" srcset="src/img/[email protected] 2x" alt="terminal">
<p>
安装 <i>Fontmin</i> 命令行工具:<em>npm i -g fontmin</em>
</p>
</div>
<div class="section app">
<div class="section-title">
<div class="bg"></div>
<h1>应用</h1>
</div>
<img src="src/img/app.png" srcset="src/img/[email protected] 2x" alt="app">
<a href="https://github.com/ecomfe/fontmin-app/releases/download/v0.2.0/Fontmin-v0.2.0-win32.zip" class="down-btn">下载 Fontmin 客户端 for Windows</a>
<div class="links">
<a class="down-link" href="https://github.com/ecomfe/fontmin-app/releases/download/v0.2.0/Fontmin-v0.2.0-osx64.zip">Fontmin for OS X</a> /
<a target="_blank" href="https://github.com/ecomfe/fontmin-app">Github</a>
</div>
</div>
<div class="section source">
<div class="section-title">
<div class="bg"></div>
<h1>源码</h1>
</div>
<a class="github" target="_blank" href="//github.com/ecomfe/fontmin">github.com/ecomfe/fontmin</a>
<p>
<a target="_blank" href="https://npmjs.org/package/fontmin">
<img data-src="http://img.shields.io/npm/v/fontmin.svg" alt="NPM version">
</a>
<a target="_blank" href="https://travis-ci.org/junmer/fontmin">
<img data-src="http://img.shields.io/travis/junmer/fontmin.svg" alt="Build Status">
</a>
<a target="_blank" href="https://npmjs.org/package/fontmin">
<img data-src="http://img.shields.io/npm/dm/fontmin.svg" alt="Downloads">
</a>
</p>
<div class="star">
如果你觉得 Fontmin 还不错,给个
<iframe class="star-btn" data-src="https://ghbtns.com/github-btn.html?user=ecomfe&repo=fontmin&type=star&count=true" frameborder="0" scrolling="0" width="90px" height="22px"></iframe>
呗,反正不花钱 :-)
</div>
<div class="thanks">
鸣谢:
<a target="_blank" href="http://www.sentyfont.com/">新蒂字体</a> /
<a target="_blank" href="http://weibo.com/eonway">浙江民间书刻体</a> /
<a target="_blank" href="http://blog.typekit.com/alternate/source-han-sans-chs/">思源字体</a>
</div>
<div class="links">
Links:
<a target="_blank" href="http://font.baidu.com">Baidu FontEditor</a> /
<a target="_blank" href="http://font-spider.org">FontSpider</a> /
<a target="_blank" href="http://efe.baidu.com">EFE Tech</a> /
<a target="_blank" href="http://ecomfe.github.io/fate/">Fate</a>
</div>
<div class="copyright">© 2015 Baidu EFE</div>
</div>
</div>
<script>
require(['app'], function (app) {
app.init();
});
</script>
<!--@tongji-->
</body>
</html>