ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit b3c569cda40a1e7aac3df070c227e1a0e30232e1
parent 9593e7a4fd79d21c662b3b705862421e05a27dcc
Author: Konstantin Tarkus <hello@tarkus.me>
Date:   Mon, 31 Aug 2015 07:44:38 +0300

Merge branch 'add-font-loaders' of https://github.com/rodolfo2488/react-starter-kit into rodolfo2488-add-font-loaders

Diffstat:
Adocs/add_custom_font.md | 19+++++++++++++++++++
Mtools/config.js | 12++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/docs/add_custom_font.md b/docs/add_custom_font.md @@ -0,0 +1,19 @@ +## Add Custom font + +### In variables.css add + +``` +@font-face { + font-family: 'Font name'; + font-style: normal; + font-weight: 400; + src: url(${path_to_fonts}/font.eot); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url(${path_to_fonts}/font.woff2) format('woff2'), + url(${path_to_fonts}/font.woff) format('woff'), + url(${path_to_fonts}/font.ttf) format('truetype'); +} +``` + +if adding diffrent extensions of fonts please add the specific loader in `tools/config.js` seciton modules/loaders diff --git a/tools/config.js b/tools/config.js @@ -82,6 +82,18 @@ const config = { test: /\.svg/, loader: 'url-loader?limit=10000&mimetype=image/svg+xml' }, { + test: /\.eot/, + loader: 'url-loader?mimetype=application/vnd.ms-fontobject' + }, { + test: /\.woff2/, + loader: 'url-loader?mimetype=application/font-woff2' + }, { + test: /\.woff/, + loader: 'url-loader?mimetype=application/font-woff' + }, { + test: /\.ttf/, + loader: 'url-loader?mimetype=application/font-ttf' + }, { test: /\.jsx?$/, include: [ path.resolve(__dirname, '../node_modules/react-routing/src'),