好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

font-spider

font-spider 介绍

font-spider是 一个 智能 自动 化压缩工具,它能 自动 分析 页面 使用的 WebFont 并进行按需压缩,并不需要指定字体与字符。 ?

特性

压缩字体:智能 删除 没有被使用的字形数据,大幅度减少字体体积

生成 字体: 支持 woff2、woff、eot、svg 字体格式 生成

安装

npm install font-spider -g

一、书写 css

/*声明 WebFont*/@font-face {font-family: 'source';src: url('font/source.eot');src:url('font/source.eot?#font-spider') format('em bed ded-opentype'),url('font/source.woff2') format('woff2'),url('font/source.woff') format('woff'),url('font/source.ttf') format('truetype'),url('font/source.svg') format('svg');font-weight: nor mal;font-style: nor mal;}/*使用指定字体*/.home h1,.demo > .test {font-family: 'source';}特别说明: @font-face 中的 src 定义的 .ttf 文件 必须存在,其余的格式将由工具 自动 生成

二、压缩 WebFont

font-spider [options] <htmlFile1 htmlFile2 ...>

htmlFiles

一个 或多个 页面地址 , 支持 http 形式。

options

-h,--help 输出 帮助信息

-V,--version 输出 当前版本号

--info 输出 WebFont 的 jsON 描述信息,不压缩与转码

--ig nor e <pattern> 忽略的 文件 配置( 支持 正则表达式)

--map <remotePath,localPath> 映射 css 内部 HTTP 路径到本地( 支持 正则表达式)

--no-backup 关闭 字体备份 功能

--debug 调试模式,打开它可以 显示 css 解析 错误

网站地址 : http://font-spider.org

GitHub: https://github.com/aui/font-spider

网站描述: 一个 智能 WebFont 压缩工具

font-spider官方网站

官方网站: http://font-spider.org

如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。

查看更多关于font-spider的详细内容...

  阅读:38次

上一篇

下一篇

第1节:LandingStock    第2节:ShowFont    第3节:Glyphicon Halflings    第4节:InterfaceLIFT    第5节:The Web Font    第6节:shields    第7节:icono    第8节:Shapes4free    第9节:barnimages    第10节:天堂图片网    第11节:imcreator    第12节:Typr.js    第13节:中华珍宝馆    第14节:Iconfever    第15节:devicon    第16节:PotlabIcons    第17节:Myfonts    第18节:fontello    第19节:octicons    第20节:IconToucan    第21节:Unsplash    第22节:图标坊    第23节:font-awesome    第24节:evil-icons    第25节:Icon Gallery    第26节:Font Squirrel    第27节:Worldvectorlogo    第28节:DesignersPics    第29节:typicons.font    第30节:icomoon    第31节:FreePik    第32节:pakutaso    第33节:CaoMei草莓图标    第34节:pngimg    第35节:fontsup    第36节:boxicons    第37节:Iconfinder    第38节:Magdeleine    第39节:Fontflipper    第40节:ICONSVG    第41节:material-design-icons    第42节:Urban Fonts    第43节:feather icons    第44节:Roundicons    第45节:EmojiOne    第46节:WallHere    第47节:The Noun Project    第48节:Cool Backgrounds    第49节:懒人图库    第50节:easyicon    第51节:simpsons-in-css    第52节:FreeImages    第53节:iconninja    第54节:vectorlogozone    第55节:IconShock    第56节:Gratisography    第57节:IconPng    第58节:font-spider    第59节:freeiconsweb    第60节:摄图网    第61节:Wallpaper Abyss    第62节:新图网    第63节:Find Icons    第64节:eva-icons    第65节:simple-icons    第66节:SimpleIcons    第67节:DdFont    第68节:picjumbo    第69节:Transfonter    第70节:Icons DB    第71节:Icon Archive    第72节:ikonate    第73节:open-iconic    第74节:favico.js    第75节:Twemoji    第76节:emojify.js    第77节:flat-color-icons    第78节:Icons8    第79节:DryIcons    第80节:Han    第81节:gifski    第82节:Fontmin    第83节:iconfont    第84节:FiraCode    第85节:DaFont    第86节:Foter    第87节:reusableart    第88节:fontfabric    第89节:奥森图标    第90节:maki-icons    第91节:flag-icon-css    第92节:beautiful-web-type    第93节:iOS Icon Gallery    第94节:Adobe Fonts    第95节:bytesize-icons    第96节:stockvault    第97节:source-code-pro    第98节:pexels    第99节:uiw icons    第100节:快图网    第101节:IconMonstr    第102节:pixabay    第103节:Loading    第104节:SuperTinyIcons    第105节:react-native-vector-icons    第106节:iconstore    第107节:Nucleo