From aa8f73939d84f2efa2f3917f1e9b027528d9e733 Mon Sep 17 00:00:00 2001 From: Hiroyuki Tanjo Date: Wed, 16 Dec 2015 17:20:51 +0900 Subject: [PATCH 1/2] Fix test assets because the test was broken --- .gitignore | 2 +- test/expected/fonts/Icons.woff | Bin 1096 -> 1116 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d1badc4..0a20320 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store node_modules -test/results +test/results* npm-debug.log \ No newline at end of file diff --git a/test/expected/fonts/Icons.woff b/test/expected/fonts/Icons.woff index 1eb38df932e6d3ed66dcebd1e78b6abcaf8cc002..6a1cb3296d0c4403807bf2b290f33fe9a75bdc84 100644 GIT binary patch delta 469 zcmX@Xafd^s+~3WOfsp|SSYjBsK{Q*#M3MOVgFx1c{im+EWTYmhFfcGp0P^*K*o?U- z#xnyb2oyU2AfE?>8Fd&Ka`KZw>Rtf(9AIq6P?DQiQ2-SC z0OZR7u>vDMgK=JBZYl!UGaL`W-e9U=8>$ zc|3Vef=nUB;x4&5dBf6}hV1K%X&>DeufG_)T)BNs zS?!H_4|B?Vf!-;c>y!10H%FXmC_JRO#yP_NoM6rS_j^lYzv%6_eeK%n|G)IJBknJs zded}mu64)f@-4=zul!#1==#1D_4!-Zemcz7$$whwdHNH6nSVEyZ_;4)nw=ORCI zM*OYC>t4$)IarfycRtp6mZZ)(p%ZSoQpzHcEB@`&_E{!01L)C;Imrnr2?-2I^5>?m z{rJZ$UUG-zGDcSkJ-gS_otH`8l3dlG!p9|S2msdpsWbop delta 435 zcmcb^ae_mn+~3WOfsp|SSUecGK{Q*!M3MOVbwJjM>d6iFGg1>%7#NspfP6h5He)V| z@yGxQ0>#z<`O-kF!l=zKDB!@$5O55%8DW^*-F6yz6|09_?B@z14t*yUe^ z175|iJ;>s#wb0sBW7mZW#_)MZbmtw&j-GSV$LQquP8Xh^U2z%@TX#rBT#q})o4;Yx zk%x_W{SPuT?{ Date: Wed, 16 Dec 2015 18:07:11 +0900 Subject: [PATCH 2/2] Support WOFF 2.0 --- README.md | 2 +- templates/_icons.css | 1 + templates/_icons.less | 1 + templates/_icons.scss | 1 + test/expected/css/_icons.css | 1 + test/expected/css/_icons.less | 1 + test/expected/css/_icons.scss | 1 + test/expected/fonts/Icons.woff2 | Bin 0 -> 760 bytes test/main.js | 8 +++++++- 9 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 test/expected/fonts/Icons.woff2 diff --git a/README.md b/README.md index 800b052..4c152e6 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ gulp.task('iconfont', function(){ }); ``` -`gulp-iconfont-css` works well with `gulp-iconfont` but you can use it in a more modular fashion by directly using `gulp-svgicons2svgfont`, `gulp-svg2tff`, `gulp-ttf2eot` and/or `gulp-ttf2woff`. +`gulp-iconfont-css` works well with `gulp-iconfont` but you can use it in a more modular fashion by directly using `gulp-svgicons2svgfont`, `gulp-svg2tff`, `gulp-ttf2eot`, `gulp-ttf2woff` and/or `gulp-ttf2woff2`. ## API diff --git a/templates/_icons.css b/templates/_icons.css index a80210c..848d4ff 100644 --- a/templates/_icons.css +++ b/templates/_icons.css @@ -2,6 +2,7 @@ font-family: "<%= fontName %>"; src: url('<%= fontPath %><%= fontName %>.eot'); src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'), + url('<%= fontPath %><%= fontName %>.woff2') format('woff2'), url('<%= fontPath %><%= fontName %>.woff') format('woff'), url('<%= fontPath %><%= fontName %>.ttf') format('truetype'), url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg'); diff --git a/templates/_icons.less b/templates/_icons.less index 6e5dad7..9a21d18 100644 --- a/templates/_icons.less +++ b/templates/_icons.less @@ -2,6 +2,7 @@ font-family: "<%= fontName %>"; src: url('<%= fontPath %><%= fontName %>.eot'); src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'), + url('<%= fontPath %><%= fontName %>.woff2') format('woff2'), url('<%= fontPath %><%= fontName %>.woff') format('woff'), url('<%= fontPath %><%= fontName %>.ttf') format('truetype'), url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg'); diff --git a/templates/_icons.scss b/templates/_icons.scss index 5196372..1a05d83 100644 --- a/templates/_icons.scss +++ b/templates/_icons.scss @@ -2,6 +2,7 @@ font-family: "<%= fontName %>"; src: url('<%= fontPath %><%= fontName %>.eot'); src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'), + url('<%= fontPath %><%= fontName %>.woff2') format('woff2'), url('<%= fontPath %><%= fontName %>.woff') format('woff'), url('<%= fontPath %><%= fontName %>.ttf') format('truetype'), url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg'); diff --git a/test/expected/css/_icons.css b/test/expected/css/_icons.css index e4a61fd..cf371bb 100644 --- a/test/expected/css/_icons.css +++ b/test/expected/css/_icons.css @@ -2,6 +2,7 @@ font-family: "Icons"; src: url('../fonts/Icons.eot'); src: url('../fonts/Icons.eot?#iefix') format('eot'), + url('../fonts/Icons.woff2') format('woff2'), url('../fonts/Icons.woff') format('woff'), url('../fonts/Icons.ttf') format('truetype'), url('../fonts/Icons.svg#Icons') format('svg'); diff --git a/test/expected/css/_icons.less b/test/expected/css/_icons.less index c7e2186..5ac6eb5 100644 --- a/test/expected/css/_icons.less +++ b/test/expected/css/_icons.less @@ -2,6 +2,7 @@ font-family: "Icons"; src: url('../fonts/Icons.eot'); src: url('../fonts/Icons.eot?#iefix') format('eot'), + url('../fonts/Icons.woff2') format('woff2'), url('../fonts/Icons.woff') format('woff'), url('../fonts/Icons.ttf') format('truetype'), url('../fonts/Icons.svg#Icons') format('svg'); diff --git a/test/expected/css/_icons.scss b/test/expected/css/_icons.scss index 6c200cf..04b210c 100644 --- a/test/expected/css/_icons.scss +++ b/test/expected/css/_icons.scss @@ -2,6 +2,7 @@ font-family: "Icons"; src: url('../fonts/Icons.eot'); src: url('../fonts/Icons.eot?#iefix') format('eot'), + url('../fonts/Icons.woff2') format('woff2'), url('../fonts/Icons.woff') format('woff'), url('../fonts/Icons.ttf') format('truetype'), url('../fonts/Icons.svg#Icons') format('svg'); diff --git a/test/expected/fonts/Icons.woff2 b/test/expected/fonts/Icons.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..1ca09dee5fed85df991d326b6912d6ea1d2e29cc GIT binary patch literal 760 zcmV2atAsapasY-ux;3rfC366U^&5~3} zZ}&EDb;)j^6HpPADv534>cFmm+h1Kx?YEz%W!VlCMopFFfJlGJ-RJywm!gnURkFg( zEiXxR8^HnOUL!n){+j>G@hzaU^9f*c(c!0?jWPJZ5({__ke-JD1(ao;xwW0fe71}s z54;pUWZ#(~} zp-)RoxbUFM&Bn&_O`Ur+Ke^EHaJ9|OO_*8CYjL5u%arC23P)RWm%K+)m*(a=r(yB5 z_4m8qr*E)l-u3DJ=1}8h#mwjVw>F>NKJ=!0pLb{M?0w&=hKaMi>S{ojd}#j<(J*Ub z=QJDAe`Z`aCG_uiel16?yygS|-oiV-GOPUYm37reUnw-hi}&_v1Fks2bF!03}#02T0EO#18u&ZRMizS)KJs@+dto9d%gly3!&g}>3aq1cp_jx~LY{WSZ z$Bf%vaZ5QFS13Slj&`C)A_|q^3~x9WN>j$da7@1RLXqO2KX$A2)1J>6-1D)V^?_(( zDVL$K-ur_XR+Ofrp`O7Ax;67L+a*YFt!EBd6WWLn3Q|