choffmeister / roboto-fontface-bower

Bower package for the Roboto font-face
Apache License 2.0
153 stars 56 forks source link

Roboto fontface

This repository has been archived. Please visit https://github.com/fontsource/fontsource for a better, actively maintained alternative that also provides many more open source fonts.

Installing

Assuming you have NodeJS, NPM and Bower installed globally just open up a terminal, navigate to your projects root directory and then execute

# install via NPM
$ npm install roboto-fontface --save

# install via Bower
$ bower install roboto-fontface --save

Usage

There're several files in the css/ subdirectory. Import them in your project to have access to "Roboto" font face:

Importing whole family may be unnecessary and lead to huge build, so if you are using SCSS or LESS, you can import only individual weights by importing for example:

With Sass/Less, you can adjust the font path to your needs with the $roboto-font-path variable. For example (Sass):

$roboto-font-path: 'path/where/you/put/fonts'
@import 'node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss'

Hinting

Some of the included font files have hinting.

Files Hinting
.woff yes
.woff2 ?