├── .bowerrc ├── fontmin.icns ├── fontmin.ico ├── fontmin.png ├── .gitignore ├── .editorconfig ├── bower.json ├── main.html ├── main.js ├── package.json ├── README.md ├── LICENSE └── components ├── fm-file-drop.html ├── fm-glyphs-input.html ├── fm-preview.html └── fm-main.html /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "dep" 3 | } 4 | -------------------------------------------------------------------------------- /fontmin.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/fontmin-app/HEAD/fontmin.icns -------------------------------------------------------------------------------- /fontmin.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/fontmin-app/HEAD/fontmin.ico -------------------------------------------------------------------------------- /fontmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/fontmin-app/HEAD/fontmin.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dep/ 2 | node_modules/ 3 | dist/ 4 | build/ 5 | .DS_Store 6 | Thumbs.db 7 | npm-debug.log 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_size = 4 5 | indent_style = space 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.json] 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fontmin-app", 3 | "private": true, 4 | "license": "MIT", 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "dep", 9 | "test" 10 | ], 11 | "dependencies": { 12 | "normalize-css": "~3.0.3", 13 | "polymer": "Polymer/polymer#~0.8.0", 14 | "layout": "Polymer/layout" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fontmin 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Fontmin App 3 | * @author Firede 4 | */ 5 | 6 | /** 7 | * 初始化目录 8 | * 9 | * Mac 下 Edit/Window 目录需要初始化,否则复制粘贴快捷键无法调起 10 | */ 11 | function initMenu() { 12 | var gui = require('nw.gui'); 13 | var win = gui.Window.get(); 14 | var nativeMenuBar = new gui.Menu({ 15 | type: 'menubar' 16 | }); 17 | 18 | nativeMenuBar.createMacBuiltin('Fontmin'); 19 | win.menu = nativeMenuBar; 20 | } 21 | 22 | function preventDefault(evt) { 23 | evt.preventDefault(); 24 | return false; 25 | } 26 | 27 | /** 28 | * Main 29 | */ 30 | window.addEventListener('load', function () { 31 | // only for mac 32 | if (process.platform === 'darwin') { 33 | initMenu(); 34 | } 35 | 36 | // Prevent drag events 37 | window.ondragover = preventDefault; 38 | window.ondrop = preventDefault; 39 | }); 40 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fontmin", 3 | "main": "main.html", 4 | "private": true, 5 | "description": "fontmin as an OS X and Windows app.", 6 | "version": "0.2.0", 7 | "license": "MIT", 8 | "keywords": [ 9 | "fontmin", 10 | "fonteditor", 11 | "efe", 12 | "app" 13 | ], 14 | "window": { 15 | "title": "Fontmin", 16 | "toolbar": false, 17 | "min_width": 740, 18 | "min_height": 450, 19 | "width": 840, 20 | "height": 550, 21 | "resizable": true, 22 | "position": "center", 23 | "icon": "fontmin.png" 24 | }, 25 | "maintainers": [ 26 | { 27 | "name": "Firede", 28 | "email": "firede@firede.us" 29 | }, 30 | { 31 | "name": "Junmer", 32 | "email": "junmer@foxmail.com" 33 | } 34 | ], 35 | "dependencies": { 36 | "fontmin": "^0.6.0", 37 | "gulp-rename": "^1.2.2" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | fontmin-app 2 | === 3 | 4 | _Fontmin_ 是第一个纯 JavaScript 实现的字体子集化方案,_Fontmin App_ 是它的客户端,提供了 _Mac OS X_、_Windows_ 平台下的发行版。 5 | 6 | [下载 Fontmin App 发行版](https://github.com/ecomfe/fontmin-app/releases) 7 | 8 | Screenshot 9 | --- 10 | 11 | ![Fontmin App](https://cloud.githubusercontent.com/assets/157338/7086319/fee1246a-dfb1-11e4-9be7-b0e8dd007f59.png) 12 | 13 | Dev 14 | --- 15 | 16 | 如果你想参与 _Fontmin App_ 开发,可按照以下步骤配置开发环境。 17 | 18 | 切到开发分支,安装依赖: 19 | 20 | ```bash 21 | $ git checkout develop 22 | $ npm install 23 | $ bower install 24 | ``` 25 | 26 | 获取最新版 [_nw.js_](https://github.com/nwjs/nw.js/releases),并用其打开项目: 27 | 28 | ```bash 29 | $ path/to/nwjs . 30 | ``` 31 | 32 | _参考文档:[通过 nw.js 打开应用](https://github.com/nwjs/nw.js/wiki/How-to-run-apps)_ 33 | 34 | Related 35 | --- 36 | 37 | + [fontmin](https://github.com/ecomfe/fontmin) 38 | + [fonteditor](https://github.com/ecomfe/fonteditor) 39 | 40 | License 41 | --- 42 | 43 | MIT © [Baidu Inc.](./LICENSE) 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Baidu Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /components/fm-file-drop.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 24 | 27 | 28 | 29 | 95 | -------------------------------------------------------------------------------- /components/fm-glyphs-input.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 56 | 63 | 64 | 65 | 125 | -------------------------------------------------------------------------------- /components/fm-preview.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 39 | 40 | 44 | 45 | 46 | 47 | 154 | -------------------------------------------------------------------------------- /components/fm-main.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 130 | 131 | 178 | 179 | 180 | 294 | --------------------------------------------------------------------------------