最後更新: 2016-07-27
介紹
Home Page: http://font-spider.org
安裝
apt-get install nodejs
apt-get install npm
npm install font-spider -g
Usage
File: font.html
<html> <head> <meta charset="UTF-8"> </head> <body> <style> @font-face { font-family: KaiGenGothicTC-Bold; src: url(KaiGenGothicTC-Bold.ttf); } div { font-family: KaiGenGothicTC-Bold; } </style> <div>測試</div> </body> </html>
File: KaiGenGothicTC-Bold.ttf <-- 16Mbyte
font-spider --info font.html
[ { id: '698afc5cff959a72c5c17cca459ba0f9', family: 'KaiGenGothicTC-Bold', files: [ { url: '/home/font-spider/tim/KaiGenGothicTC-Bold.ttf', format: 'truetype' } ], chars: '測試', selectors: [ 'div' ] } ]
font-spider font.html
Font family: KaiGenGothicTC-Bold Original size: 16442.452 KB Include chars: 測試 Chars length: 2 Font id: 698afc5cff959a72c5c17cca459ba0f9 CSS selectors: div Font files: File KaiGenGothicTC-Bold.ttf created: 5.544 KB
P.S.
原本的字形 backup 到 Folder ".font-spider"